beautypg.com

BrightSign BrightScript 2 Reference Guide User Manual

Page 11

background image

11

When a single precision number is converted to double precision, only the seven most
significant digits will be accurate.

Operators


Operations in the innermost level of parentheses are performed first, then evaluation
proceeds according to the precedence in the following table. Operations on the same
precedence are right-to-left associative, except for exponentiation, which is right-to-left.

( ) Function call, or
Parentheses
. , [] Array Operator

^ (Exponentiation)
–, + (Negation)

*, /

+, -

<, >, = , <>, <=, >=

NOT

AND

OR

String Operators

The following operators work with strings
<. >, =, <>, <=, >=, +

Function References

= , <> work on variables that contain function references and function literals

Logical and Bitwise Operators

Example:

if a=c and not(b>40) then print “success”

AND, OR and NOT can be used for logical (Boolean) or bit manipulation & bitwise
comparisons. If the arguments to these operators are Boolean, then they perform a
logical operation. If the arguments are numeric, they perform bitwise operations.

x = 1 and 2 „ x is zero

y = true and false „ y is false