:pre-compiler,  :var,  :begin,  :end

Navigation:  Appendices > Macro Language > Compiled Code > Op-Codes >

:pre-compiler,  :var,  :begin,  :end

Previous pageReturn to chapter overviewNext page

These op-codes are section headers which help make the compiled code easier to read. Technically the interpreter does not need them, although Q++ checks for their presence when opening a macro, to spot any corruption of the compiled code.

 

Consider the following simple "do-nothing" macro :

 

var

begin

end

 

The above macro will compile just fine to the following :

 

0000 :var

0001 :begin

0002 :end

 

A few point to note.

 

The source code pointer starts counting line numbers at 0, not 1. This a programmer's habit that is supposed to look cool.

The :pre-compiler header only appears if you include some compiler directives in your code.

The values of the system variables are initialized by the compiler, outside of the compiled code. The reason is that you do not know at compile time what these values will be, and some of these change all the time (such as n_TokenDate).

 

From the above Macro, the values for bRESULT and sRESULT, would be their default initial values : false and '' (empty string).


Topic 108284 updated on 14-Oct-2005.
Topic URL: http://www.qppstudio.net/webhelp/index.html?_pre_compiler__var__begin__end.htm