BASIC stamp manual v2.2
DEBUG – BASIC Stamp Command Reference
Page 160 • BASIC Stamp Syntax and Reference Manual 2.2 • www.parallax.com
the BASIC Stamp. A moment later, the phrase "Hello World!" will appear.
Note that if you close the Debug Terminal, your program keeps executing,
but you can’t see the DEBUG data anymore.
Multiple pieces of data can be sent with one DEBUG command by
separating the data with commas (,). The following example produces
exactly the same results as the example above.
DEBUG "Hello ", "World!"
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 = B2
x = 75
DEBUG x
displays "x = 75" on the screen. To display the value, in decimal, without
the "x =" text, use the value formatter (#) before the variable name. For
example, the following code displays "75" on the screen.
SYMBOL x = B2
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 = B2
x = 75
DEBUG $x, %x
DISPLAYING DECIMAL NUMBERS (BS1).
D
ISPLAYING HEXADECIMAL OR BINARY
NUMBERS
(
BS1
)
.
1