|
Complex Expression Examples |
Top Previous Next |
|
Numeric Functions:
Let>r={round(34.6)} Let>ans={cos(340)}
Using numeric variables in complex expressions we enclose variables in % symbols:
Let>r=34.6 Let>r={round(%r%)}
String Functions:
In Complex expressions string literals must be enclosed in double quotes ("). Variables are just enclosed with % symbols:
Let>email=fred@someserver.com Let>at={Pos("@",%email%)}
Here at equals 5 as it is the 5th character in fred@someserver.com
Let's now use the copy function to extract everything before the @ sign:
Let>namepart={copy(%email%,1,%at%-1)}
Conditional Functions:
Let>email=fred@someserver.com Let>IsItAnEmail={if(pos("@",%email%)>0,"yes","no")}
Of course we could do:
Let>email=fred@someserver.com Let>at={Pos("@",%email%)} Let>IsItAnEmail={if(%at%>0,"yes","no")}
Here IsItAnEmail would be set to "yes". |