EVAL - evaluate arithmetic and logical expressions.

Syntax:

EVAL expression [expression]*

Examples:

eval 3+3 4**2 "xxx"+"yyy"
eval sin( 90.0 / (360.0/(2*pi)))

Description:

EVAL displays the value of each expression, separated by spaces. EVAL expressions take the same form as expressions in the TSS IF command.

An "_" in any expression represents the value of the previous expression. For example,

eval 3+3 _

displays

6 6

As with IF, EVAL keeps the value of "_" in the UST core file for subsequent use by later EVAL or IF commands.

EVAL lets you redirect its output using the normal ">file" and ">>file" constructions. However, to avoid confusion with expressions that use ">" or ">>" as operators, the following rules apply:

These rules do not avoid all ambiguity. For example, in an expression like

eval 3+5 >4/2

the "4/2" is assumed to be a file named "2" under a userid named "4". This will probably fail unless your site really has a userid named "4". Such situations seldom occur. If you do not want "4/2" to be taken as a filename, put a space after the ">", as in

eval 3+5 > 4/2

See Also:

expl if

Copyright © 1996, Thinkage Ltd.