Download Automation Engine Script Guide

Transcript
Automation Engine
Examples
The first example passes the multiplication result on to a script variable. The result that is returned is
"100".
:SET &OP1# = 4
:SET &OP2# = 25
:SET &RESULT# = MULT(&OP1#,&OP2#)
The following example shows a multiplication with floating-point numbers.
:DEFINE &RESULT#,float
:SET &RESULT# = MULT(-10.31,5.45)
:P &RESULT#
The result is output in the activation protocol:
U0020408 -0000000000000056.1895000000000000
See also:
Script element
Description
ADD
Performs an addition.
SUB
Performs a subtraction.
MOD
Returns the remainder of a division.
DIV
Performs a division.
RANDOM
Generates random numbers.
Script Elements - Arithmetics
About Scripts
Script Elements - Alphabetical Listing
Script Elements - Ordered by function
3.13.6 RANDOM
Script Function: Generates random numbers.
Syntax
RANDOM(Minimum, Maximum[, Basis])
Syntax
Description/Format
Minimum
Minimal value of the generated random number.
Format: Number or script variable
Maximum
Maximal value of the generated random number.
Format: Number or script variable
Basis
Initial value for generation.
Format: Number or script variable
413