5: BASIC Stamp Command Reference - DEBUG
BASIC Stamp Programming Manual 2.0c
•
www.parallaxinc.com
•
Page 97
DEBUG
BS1 BS2 BS2e BS2sx BS2p
DEBUG
OutputData {, OutputData}
Function
Display information on the PC screen within the BASIC Stamp editor
program. This command can be used to display text or numbers in
various formats on the PC screen in order to follow program flow (called
debugging) or as part of the functionality of the BASIC Stamp application.
•
OutputData
is a variable/constant/expression (0 – 65535) that
specifies the information to output. Valid data can be ASCII
characters (text strings and control characters), decimal numbers (0 -
65535), hexadecimal numbers ($0000 - $FFFF) or binary numbers (up
to %1111111111111111). Data can be modified with special
formatters as explained below.
Explanation
DEBUG provides a convenient way for your BASIC Stamp to send
messages to the
PC
screen while running. The name “debug” suggests its
most popular use; debugging programs by showing you the value of a
variable or expression, or by indicating what portion of a program is
currently executing. DEBUG is also a great way to rehearse programming
techniques. Throughout this manual, we use DEBUG to give you
immediate feedback on the effects of instructions. The following example
demonstrates using the DEBUG command to send the text string message
“Hello World!”.
DEBUG "Hello World!" ' Test message.
After you download this one-line program, the BASIC Stamp Editor will
open a Debug Terminal on your PC screen and wait for a response from
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!" 'Test message
1
2
e
2
sx
2
p
2
1
NOTE: Expressions are not
allowed as arguments on the BS1.
The only constant allowed for the
BS1 DEBUG command is a text
string.
Содержание BASIC Stamp 1
Страница 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...