(See Operator Precedence for details of the sequence in which expression operators are evaluated.)
There are two types of operators in PBASIC, binary operators which require two arguments (such as the addition operator in 2 + 3) and unary operators which require one argument (such as the negate operator in -5). All the PBASIC operators are shown below, grouped under binary operators or unary operators. Click on any operator to see a full description on the Binary Operator or Unary Operator page.
Many of the operator descriptions will say something like "computes (some function) of a 16-bit number." This does not mean that the operator does not work on smaller byte or nibble values, but rather that the computation is done in a 16-bit workspace. If the value is smaller than 16 bits, the BASIC Stamp pads it with leading 0s to make a 16-bit value. If the 16-bit result of a calculation is to be packed into a smaller variable, the higher-order bits are discarded (truncated).
BASIC Stamp Help Version 2.5.4
Copyright © Parallax Inc.
8/8/2012