Parallax BASIC Stamp II Manual page 25

Table of Contents

Advertisement

sqr 50000
~ in0
Binary operators take two terms and go between variables, constants,
or expressions. They are as follows:
&
Bitwise AND
|
Bitwise OR
^
Bitwise XOR
MIN
Limit value to minimum
MAX
Limit value to maximum
+
Addition
-
Subtraction
*
Multiply
**
Multiply and return high 16-bits of result
*/
Multiply and return middle 16-bits of result
(use to simultaneously multiply by a whole and a part;
ie. 'value */ $0180' multiplies by 1 and a half)
/
Divide
//
Divide and return remainder
DIG
Return decimal digit; '12345 dig 3' returns 2
<<
Shift left
>>
Shift right
REV
Reverse order of bits, lsb-justified; '%100110 rev 6'
yields %011001
Examples:
ypos * xsize + xpos
randword // 20
countacc min 200 - 200 / 200
Parentheses can be placed to special-order the pattern of expression
resolution. Though unary operators have highest priority and binary
operators have secondary priority, and with those rules expressions
BASIC Stamp II Manual 0.94 • Parallax, Inc. • (916) 624-8333 • Page 25
BASIC Stamp II

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