Add
Add>Value,Number
Adds Number to Value. Deprecated by Let for numeric calculations.
Interpreted as Value = Value + Number
Value must be a variable containing either a numeric or date value. Number can be either a literal number or a variable containing a numeric value.
For date values this function will add the number of days, represented in Number to the given date value.
Add Example
Let>Counter=5 Add>Counter,2i.e. Counter=Counter+2
In this example the numeric variable, Counter, is given a new value of 7.
Let
Let>variable_name=value
Let is used to assign a value to a variable.
Where parameters are passed to commands, variables can also be passed. Variables can also be embedded within a parameter by enclosing the variable name within % symbols.
Let can also be used to perform basic calculations, and to concatinate strings. NB. If you want to assign to a variable a string that already contains a + sign, add an extra + sign to avoid the two strings being concatinated.
The value can contain a complex expression:
Complex Expressions must be contained within curly braces "{" and "}". String literals must be delimited with double quotes ("), e.g.: "string". Variables must be delimited with % symbols, e.g.: %VarA%.
Several types of operators and functions can be used with complex expressions. For more details see Complex Expressions.
Let Examples
Let>name=freddy Let>a=5 Let>path=c:\Program Files\ Run Program>%path%myapp.exe Let>k=k+1 Let>A=60-4 Let>A=5*3 Let>F=75/32 Let>Forename=John Let>Surname=Smith Let>Name=%Forename% %Surname% Name would now equal John Smith Let>MyVal={Upper("WorLd")} Let>MyVal={5 * 10 + 25} Let>d={%a%+%b%*%c%-23}SetRoundMode
SetRoundMode>roundingmode
Sets the rounding mode for the Arithmetic "Round" function. Roundingmode can be one of:
- 0: Round to Nearest (Default)
- 1: Round Down
- 2: Round Up
- 3: Truncate
Sub
Sub>Value,Number
Substracts Number from a Value. Deprecated by Let for numeric calculations.
Interpreted as Value = Value - Number
Value must be a variable containing a numeric or date value. Number can be either a literal number or a variable containing a numeric value.
For date values this function will subtract the number of days, represented in Number from the given date value.
Sub Example
Let>Counter=5 Sub>Counter,2i.e. Counter=Counter-2
In this example the numeric variable, Counter, is given a new value of 3.
Let>Counter=Counter-1Will now do the same thing.
Comments
0 comments
Please sign in to leave a comment.