Table of Contents

Advertisement

DEBUG outputdata
Show variables and messages for debugging purposes.
usage:
DEBUG "Here we are!"
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
will yield (if x=1):
X = 1
DEBUG dec X
yields:
1
When printing numbers, these prefixes can be used before expressions:
ASC?
STR
STR
REP
DEC
DEC1-DEC5
SDEC
SDEC1-SDEC5
HEX
HEX1-HEX4
SHEX
SHEX1-SHEX4
IHEX
IHEX1-IHEX4
Page 30 • BASIC Stamp II Manual 0.94 • Parallax, Inc. • (916) 624-8333
BASIC Stamp II
Show ASCII value with relation
bytevar
Output string from byte array - until 0
bytevar\n
Output string from byte array - n bytes
value\n
Output value n times
value
Print value in decimal
value
Print value in decimal - 1-5 digits
value
Print value in signed decimal
value
Print value in signed decimal - 1-5 digits
value
Print value in hex
value
Print value in hex - 1-4 digits
value
Print value in signed hex
value
Print value in signed hex - 1-4 digits
value
Print value in hex w/'$'
value
Print value in hex w/'$' - 1-4 digits
Show message when executed
Show X in decimal with relation
Show X in decimal

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the BASIC Stamp II and is the answer not in the manual?

Table of Contents