Page 30 • BASIC Stamp II Manual 0.94 • Parallax, Inc. • (916) 624-8333
BASIC Stamp II
DEBUG outputdata
Show variables and messages for debugging purposes.
usage:
DEBUG “Here we are!”
Show message when executed
When executed, the data after DEBUG will be sent to the PC for dis-
play. DEBUG data can be displayed in several modes. Straight data
can be relayed to the PC, or you can have values printed in decimal,
hex, binary, or ASCII. In the number-printing modes, the result of an
expression can be printed or a complete relation can be shown between
the expression and its result. For example:
DEBUG dec? X
Show X in decimal with relation
will yield (if x=1):
X = 1
DEBUG dec X
Show X in decimal
yields:
1
When printing numbers, these prefixes can be used before expressions:
ASC?
Show ASCII value with relation
STR
bytevar
Output string from byte array - until 0
STR
bytevar\n
Output string from byte array - n bytes
REP
value\n
Output value n times
DEC
value
Print value in decimal
DEC1-DEC5
value
Print value in decimal - 1-5 digits
SDEC
value
Print value in signed decimal
SDEC1-SDEC5
value
Print value in signed decimal - 1-5 digits
HEX
value
Print value in hex
HEX1-HEX4
value
Print value in hex - 1-4 digits
SHEX
value
Print value in signed hex
SHEX1-SHEX4
value
Print value in signed hex - 1-4 digits
IHEX
value
Print value in hex w/’$’
IHEX1-IHEX4
value
Print value in hex w/’$’ - 1-4 digits
Summary of Contents for BASIC Stamp II
Page 2: ...BLANK PAGE...