Declaring Variables

Navigation:  Appendices > Macro Language > Variables >

Declaring Variables

Previous pageReturn to chapter overviewNext page

In Q++ Macros, you must declare any variable that you use.

 

var

 nWeekDay sDayName bIsWeekEnd

 nNumDays bIsLeapYear

begin

 // use these variable in some code

end

 

Declaring a variable is simple; place it in the var section of a macro, as shown in the above example. Some additional comments :

 

You can declare many variables on the same line. Simply separate each variable name by a space. Do not use separators such as ",".

 

The order in which you declare variables is not important.

 

You can insert comments anywhere in the var block; they are ignored by the compiler.

 

Note that variable names must follow certain naming conventions.


Topic 108184 updated on 03-Jan-2002.
Topic URL: http://www.qppstudio.net/webhelp/index.html?declaringvariables.htm