DEBUG - BASIC Stamp Command Reference
Page 104
•
BASIC Stamp Programming Manual 2.0b
•
www.parallaxinc.com
To specify a fixed-width format for the STR formatter, use the form STR
x\n; where x is the byte array and n is the number of characters to print.
Changing the DEBUG line in the example above to: DEBUG STR x\2
would display "AB" on the screen.
If you need to display the same ASCII character multiple times, the REP
(repeat) formatter can help. REP takes the form: REP x\n ;where x is the
character and n is the number of times to repeat it. For example:
DEBUG REP "-"\10
would display 10 hyphens on the screen, "----------".
Since individual DEBUG instructions can grow to be fairly complicated,
and since a program can contain many DEBUGS, you’ll probably want to
control the character positioning of the Debug Terminal screen. DEBUG
supports a number of different control characters, some with pre-defined
symbols (see Table 6.4). The Debug Terminal in the Windows version of
the editor supports all the control characters in Table 6.4, while the DOS
version only supports a few of them.
Some of the control characters have pre-defined symbols associated with
them. In your DEBUG commands, you can use those symbols, for
example: DEBUG "Hello", CR displays "Hello" followed by a carriage
return. You can always use the ASCII value for any of the control
characters, however. For example: DEBUG "Hello", 13 is exactly the
same as the code above.
The Move To control character is perhaps the most unique of the set. If the
Debug Terminal receives this character, it expects to see an x and y
position value to follow (in the next two characters received). The
following line moves the cursor to column number 4 in row number 5 and
displays "Hello":
DEBUG 2, 4, 5, "Hello"
The upper-left cursor position is 0,0 (that is column 0, row 0). The right-
most cursor positions depend on the size of the Debug Terminal window
(which is user adjustable). If a character position that is out of range is
F
IXED
-
WIDTH STRINGS
.
R
EPEATING CHARACTERS
.
S
PECIAL
C
ONTROL CHARACTERS
.
Содержание BASIC Stamp 2e
Страница 1: ...BASIC Stamp Programming Manual Version 2 0c...
Страница 30: ...Introduction to the BASIC Stamps Page 28 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 34: ...Quick Start Guide Page 32 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 90: ...BUTTON BASIC Stamp Command Reference Page 88 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 118: ...END BASIC Stamp Command Reference Page 116 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 128: ...FREQOUT BASIC Stamp Command Reference Page 126 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 196: ...NAP BASIC Stamp Command Reference Page 194 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 206: ...OWIN BASIC Stamp Command Reference Page 204 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 214: ...OWOUT BASIC Stamp Command Reference Page 212 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 216: ...PAUSE BASIC Stamp Command Reference Page 214 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 226: ...POLLMODE BASIC Stamp Command Reference Page 224 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 232: ...POLLOUT BASIC Stamp Command Reference Page 230 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 236: ...POLLRUN BASIC Stamp Command Reference Page 234 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 240: ...POLLWAIT BASIC Stamp Command Reference Page 238 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 262: ...RCTIME BASIC Stamp Command Reference Page 260 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 274: ...RUN BASIC Stamp Command Reference Page 272 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 310: ...SEROUT BASIC Stamp Command Reference Page 308 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 324: ...STOP BASIC Stamp Command Reference Page 322 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 340: ...ASCII Chart Page 338 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 342: ...Reserved Words Page 340 BASIC Stamp Programming Manual 2 0b www parallaxinc com...
Страница 346: ...Conversion Formatters Page 344 BASIC Stamp Programming Manual 2 0b www parallaxinc com...