User guide

eWON 500-2001-4001-4002 User Guide - Programming the eWON
eWON 500®2001®4001®4002® Version 4_3_0 - User Guide - 10/5/05 - ©ACT'L sa - Page 168
9.2.78 VAL
Syntax [function]
VAL S1
Purpose:
The function evaluates the character string and returns the corresponding expression.
Note:
VAL is a function that usually takes an expression and returns a Real after expression evaluation.
This VAL function can also evaluate an expression that returns a string.
Example:
See also:
“STR$” on page 166.
9.2.79 XOR
Syntax [Operator]
E1 XOR E2
Purpose:
This command returns the bitwise XOR comparison of E1 and E2.
a XOR b returns 1 if a if true
or if b is true, but NOT IF both of them are true.
Example:
See also:
“Operators priority” on page 127, “AND” on page 131, “OR” on page 158.
a$= "12"
a% = VAL (" 10"+ a$)
REM a% equal 1012
a$="abc"
b$="efg"
c$=val("a$+b$")
REM c$ equal "abcefg"
1 XOR 2 returns 1
2 XOR 2 returns 0