BASIC stamp manual v2.2

3: Using the BASIC Stamp Editor
BASIC Stamp Syntax and Reference Manual 2.2 www.parallax.com Page 75
#ERROR Message
#ERROR displays a compile-time error. This allows the programmer to
flag fatal errors during compilation.
Message is the error message string, enclosed in quotes.
Example:
' {$PBASIC 2.5}
#DEFINE I2CReady = (($STAMP = BS2p) OR ($STAMP = BS2pe) OR ($STAMP = BS2px))
#IF NOT I2CReady #THEN
#ERROR "BS2p, BS2pe, or BS2px is required for this program."
#ENDIF
When compiled, this example will cause the editor to halt compilation and
display the dialog below if you attempt to compile for a BASIC Stamp
model other than the BS2p, BS2pe, or BS2px:
Figure 3.27: Custom Error
Message using the #ERROR
directive.
Features for Developers
The BASIC Stamp Editor has several features that are designed to support
the needs of developers. Note: when installing the BASIC Stamp editor,
you can instruct the installer to include additional developer resources by
selecting the “Custom” option from the “Setup Type” prompt.
The Generate Object Code feature allows you to tokenize a PBASIC
program and save it to a file in the tokenized form. This allows you to
send your BASIC Stamp object code (the actual binary data that is
downloaded to the BASIC Stamp module) to other people without having
to reveal your PBASIC source code. If you are a developer who has
#ERROR SYNTAX.
G
ENERATE OBJECT CODE FEATURE.