Calculate expressions
Tools tab > Utilities group > (Calculate), EVAL |
With this function, you can calculate user-defined expressions.
Expression may contain numbers, basic arithmetical functions, parenthesis and all mathematical function in the K programming language.
+ add
- subtract
* multiply
/ divide
&& AND
|| OR
! NOT
~ complement
& AND
| OR
^ exclusive OR
<< shift left
>> shift right
== equal
!= not equal
<= less than or equal to
>= greater than or equal to
< less than
> greater than
mid(sa,ia1,ia2) returns ia1 characters from string sa starting from character number ia2.
You can also use the system variable USERR0…USERR9 reserved for users. You can save the result into a system variable or use their values in the expression. Bear in mind, however, that certain applications use these system variables.
Examples.
>EVAL
Expression: sqr(24)
576
>EVAL
Expression: USERR0=SIN(45)
>EVAL
Expression: ASIN(USERR0)
45
Tip: You can enter an expression whenever the program expects a value. The expression has to be in parentheses. E.g. when the program expects an angle value, you can enter (12*2.5), which will result in an angle entry of 30.