BASIC stamp manual v2.2
5: BASIC Stamp Command Reference
BASIC Stamp Syntax and Reference Manual 2.2 • www.parallax.com • Page 123
Introduction
This chapter provides details on all three versions of the PBASIC
Programming Language. A categorical listing of all available PBASIC
commands is followed by an alphabetized command reference with
syntax, functional descriptions, and example code for each command.
PBASIC LANGUAGE VERSIONS
There are three forms of the PBASIC language: PBASIC 1.0 (for the BS1),
PBASIC 2.0 (for all BS2 models) and PBASIC 2.5 (for all BS2 models). You
may use any version of the language that is appropriate for your BASIC
Stamp module; however, when using any BS2 model, we suggest you use
PBASIC 2.5 for any new programs you write because of the advanced
control and flexibility it allows. PBASIC 2.5 is backward compatible with
almost every existing PBASIC 2.0-based program, and code that is not
100% compatible can easily be modified to work in PBASIC 2.5.
This chapter gives details on every command for every BASIC Stamp
model. Be sure to pay attention to any notes in the margins and body text
regarding supported models and PBASIC language versions wherever
they apply.
The BASIC Stamp Editor for Windows defaults to using PBASIC 1.0 (for
the BS1) or PBASIC 2.0 (for all BS2 models). If you wish to use the default
language for your BASIC Stamp model you need not do anything special.
If you wish to use PBASIC 2.5, you must specify that fact, using the
$PBASIC directive in your source code, for example:
' {$PBASIC 2.5}
Review the Compiler Directives section of Chapter 3 for more details on
this directive. Note: you may also specify either 1.0 or 2.0 using the
$PBASIC directive if you wish to explicitly state those desired languages.
Please note that the reserved word set will vary with each version of
PBASIC, with additional reserved words for some BASIC Stamp models.
Please see the reserved words tables in Appendix B for the complete lists.
PBASIC 2.5 features many enhancements. Table 5.1 gives a brief summary
of these items, with references to more information given elsewhere.