Let |
Top Previous Next |
The following commands have been implemented in EMUEScript exactly as they are implemented in OLIE™:
Note: The Let command is only valid for assigning numeric values to variables. The Copy command is used to assign literal string to variables.
Syntax - Let <variable name> = <source value> Where: <variable name> is the user defined name that is assigned to the variable.<source value> is a numeric value or a variable containing a numeric value. Description: The Let command is used to assign a numeric value to a variable. This command can also be used to perform basic arithmetic such as addition, subtraction, multiplication, and division. For more complex arithmetic that requires multiple operators, use the Complex Let.
Sample 1: This example assigns the value 1 to the variable Count. Let Count = 1
Sample 2: This sample increments the variable Count by adding one to it and storing the resulting value back into the variable Count. Let Count = Count + 1
Syntax - MOD Let <variable name> = <value1> MOD <value2> Where: <variable name> is the user defined name that is assigned to the variable. <value1> is a number or a variable containing a numeric value. <value2> is a number or a variable containing a numeric value. Description: The MOD value is defined as the integer remainder of <value1> divided by <value2>. This value is stored in <variable name>.
Note: Use of the MOD operator will always result in an integer value being stored in the variable. Note: If the numbers or variables used as <value1> or <value2> are not integers, value1 and value2 will be rounded before the division is calculated.
Sample 1: In the following example, 12 is divided by 5 with a remainder of 2, which is the new value stored in Remainder. Let Remainder = 12 MOD 5
Sample 2: In the following example, 6 divides evenly into 6 and so there is no remainder. The value of the variable Remainder is then 0. Let Remainder = 6 MOD 6
|