DEBUG - BASIC Stamp Command Reference
Page 98
•
BASIC Stamp Programming Manual 2.0b
•
www.parallaxinc.com
DEBUG can also print and format numbers (values) from both constants
and variables. The formatting methods for DEBUG are very different for
the BS1, than for any other BASIC Stamp. Please read the appropriate
sections, below, carefully.
BASIC Stamp 1 Formatting
On the BS1, the DEBUG command, by default, displays numbers in the
format "symbol = value" (followed by a carriage return), using the decimal
number system. For example,
SYMBOL X = B0
X = 75
DEBUG X
displays "X = 75" on the screen. To display the value, in decimal, without
the "X =" text, use the decimal formatter (#) before the variable name. For
example, the following code displays "75" on the screen.
SYMBOL X = B0
X = 75
DEBUG #X
To display numbers in hexadecimal or binary form, use the $ or %
formatter, respectively. The code below displays the same number in its
hexadecimal and binary forms.
SYMBOL X = B0
X = 75
DEBUG $X, %X
After running the above code, "X = $4B" and "X = %01001011" should
appear on the screen. The hexadecimal ($) and binary (%) formatters
always display the number using the format "symbol = value" (followed
by a carriage return). There is no built-in way to display hexadecimal or
binary numbers in any other form when using the BS1's DEBUG
command.
To display a number as its ASCII character equivalent, use the ASCII
formatter (@). Typing DEBUG @X (in place of the DEBUG statement in
the code above) would display "X = 'K'" on the screen.
1
D
ISPLAYING DECIMAL NUMBERS
(BS1).
D
ISPLAYING HEXADECIMAL OR BINARY
NUMBERS
(BS1).
D
ISPLAYING
ASCII
CHARACTERS
(BS1).
Содержание 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...