Please enable JavaScript to view this site.

 

In the previous sections we began our study of the macro language by looking at the types of data which can be used, then we saw how variables can be used to store this data (or values), and we then saw how operators and functions can be used to obtain values from a combination of literals and variables. We will now bring the above concepts together, to learn how to write expressions.

 

Expressions are used in the instructions block, and are combinations of literals, variables, operators and function calls which produce a single value. Expressions can range from simple to complex :

23 
true 
'Japan'
Today() +1
sRESULT + 's'
IntToStr(nNumDays div 7) + ' weeks'

When writing boolean expressions, you can achieve important speed improvements by using shortcut boolean evaluation.