The operators of the Safety Tool are like subroutines or functions in a programming language: they yield results which may be further used to produce some new results, etc.
Table 2: List of arithmetic operators (in order of decreasing precedence), arithmetic arguments, arithmetic result.
Name
|
Description
|
^
|
power
|
-
|
unary 
|
*
|
multiplication
|
/
|
division
|
%
|
modulo (integer arguments)
|
+
|
addition
|
-
|
subtraction
|
|
Table 3: List of comparison operators (in order of decreasing precedence), arithmetic arguments, logical result.
Name
|
Description
|

|
greater than
|

|
less than
|

|
greater or equal than
|

|
less or equal than
|

|
equal to
|

|
not equal to (C style)
|

|
not equal to (PASCAL style)
|
|
Table 4: List of logical operators (in order of decreasing precedence), logical arguments, logical result.
Name
|
Description
|

|
logical AND
|

|
logical OR
|
|
Table 5: List of predefined mathematical functions (floating point or integer argument, floating point result).
Name
|
Description
|
sin
|
sine
|
cos
|
cosine
|
tan
|
tangent
|
asin
|
arc sine
|
acos
|
arc cosine
|
atan
|
arc tangent
|
ln
|
natural logarithm
|
log
|
base 10 logarithm
|
exp
|
exponent ( power argument)
|
sqrt
|
square root
|
abs
|
absolute value
|
cbrt
|
cubic root
|
sinh
|
hyperbolic sine
|
cosh
|
hyperbolic cosine
|
tanh
|
hyperbolic tangent
|
asinh
|
inverse hyperbolic sine
|
acosh
|
inverse hyperbolic cosine
|
atanh
|
inverse hyperbolic tangent
|
|
As was stated at the beginning of the paragraph devoted to the tool's command language, the actions that may be applied to an object depend on this object's type. That is why the existing operators will be listed together with their argument lists and result types.
The simplest operators, acting on scalar type objects are listed in Tables 2 through 5.
There are two categories of operations: operators and instructions. The first ones yield a result computed using their operands. The second ones have a global action (such as output) or modify (some of) their operands.
Finally, some operators (or instructions) can have several syntaxes. The operation to be executed is deduced in such a case from the type and the number of operands. This note applies to arithmetic operators (number
number, number
vector) and to complex operators as well (for example, the NEW_LINE Operator).
See the Batch Language Reference Manual for the description of the syntax of all operators and instructions.