Let (Complex)

Top  Previous  Next

×V3.0Ø

S

A

W

WS

ü

ü

Complex Let assignments are used to make multiple comparisons computations in the same line in addition to performing variable assignment.  For example, a single line could retrieve the length of a string, add a value to it, and assign the resulting value to a variable.  In order for the complex Let assignments to be evaluated properly, the expression must be inside parentheses.

       

Mathematical Operators

The same mathematical operators (+, -, /, *) are supported in the complex If structure, but there is no restriction to the number of operations that are performed.   Additional parentheses can be used for precedence or to add clarity.

 

Sample: Calculating Percentages

Let PercentPosted = ((EMUEPosted / TransCount) * 100)

 

Special Operators

There are a few special operators that can be used in the Complex Let assignment.  Each of the following expressions results in a numeric value that can be used in an assignment.

 

Mod(<Number1>, <Number2>)

Returns the remainder when <Number1> is divided by <Number2>

FindString(<String1>, <String2>)

Returns the position of the first occurrence of <String2> within <String1> See also, FindString.

Length(<String>)

Returns the length of the string.

 

Sample:

       The following example adds one to the length of the variable LastName.

Let x = (Length(LastName) + 1)

 

See Also:

Let