Table of Contents

sub

Description

Subtract one number from another.

Function prototype

variant sub <variant:arg1> <variant:arg2>

Arguments

Name Type Comment
arg1 variant A number.
arg2 variant The number to be subtracted from arg1.

If the type of arg1 is not equal to that of arg2, the ordering of the arguments may change the result of calls to sub. See comments for add.

Return value

The value of arg1 minus arg2, in the data type of arg1.

Example

echo <zs:sub 9.5 3>

… the output of which is written to the event log by echo as:

6.5

Comments

None.

See also