Expressions

Navigation:  Appendices > Macro Language >

Expressions

Previous pageReturn to chapter overviewNext page

In the previous sections we began our study of the Q++ 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 a judicious ordering of the boolean conditions being calculated. See Shortcut Boolean Evaluation for more details.


Topic 133600 updated on 30-Oct-2002.
Topic URL: http://www.qppstudio.net/webhelp/index.html?expressions.htm