Specifications

Appendix C
Parallax, Inc. • BASIC Stamp Programming Manual 1.8 • Page 397
C
EXPRESSIONS
BASIC STAMP I
{-} value ?? value {?? value...}
Stamp I expressions are only allowed within an assignment state-
ment. See the LET command for more detail.
VALUE is a constant or a bit, byte or word variable.
?? is +,-,*,**,/,//,MIN,MAX,&,1,^,&/,|/,^/.
BASIC STAMP II
{?} value ?? value {?? {?} value}
Stamp II expressions are allowed in place of almost any argument
in any command as well as within an assignment statement.
? is SQR, ABS, ~, -, DCD, NCD, COS, SIN.
VALUE is a constant or a bit, nibble, byte or word variable.
?? is +,-,*,**,*/,/,//,MIN,MAX,&,|,^,DIG,<<,>>,REV.
Parentheses may be used to modify the order of expression
evaluation.
CONVERSION: BS1 R BS2
1.Remove the LET command. This is not allowed in the Stamp II.
VARIABLE and VALUE may be nibble variables for efficiency.
• The optional unary operator {-} may now also include SQR, ABS,
~, DCD, NCD, COS and SIN.
The binary operators can now include */, DIG, <<, >> and REV.
Example:
BS1: LET b0 = -10 + 16
BS2: Result = -10 + 16