Motion Coordinator Technical Reference Manual
Trio BASIC Commands 8-149
Mathematical Operations and Commands
>>
TAN
Type:
Mathematical Function
Syntax:
TAN(expression)
Description:
Returns the TANGENT of an expression. This is valid for any value expressed in radi-
ans.
Parameters:
Example:
>>PRINT TAN(0.5)
0.5463
XOR
Type:
Logical and bitwise operator
Description:
This performs and XOR function between corresponding bits of the integer part of
two valid Trio BASIC expressions. It may therefore be used as either a bitwise or log-
ical condition.
The
XOR
function between two bits is defined as follows:
Parameters:
Example:
a = 10 XOR (2.1*9)
Trio BASIC evaluates the parentheses first giving the value 18.9, but as was speci-
fied earlier, only the integer part of the number is used for the operation, therefore
this expression is equivalent to:
a=10 XOR 18
. The
XOR
is a bitwise operator and so
the binary action taking place is:
01010
XOR 10010
----------
11000
The result is therefore 24.
Expression:
Any valid Trio BASIC expression.
Expression1:
Any valid Trio BASIC expression
Expression2:
Any valid Trio BASIC expression