Please enable JavaScript to view this site.

 

Navigation: Macros > Macro Language > Code Structure

The global Macro Code Section

Scroll Prev Up Next More

The global section of a macro is optional and is where any global variables of a macro are declared.

global
   nDate
input
   // optional section
var
   // declare some variables
begin
   // macro body
end

Variables are declared by listing them in the declaration block, the same way it is done in the var block.

 

You do not need to declare the type of the variables, since it is determined by the first letter of the variable name.

Do not use any separators such as commas to separate the variable.

Note that the list of variable can extend onto as many lines as you wish.

 

See also: global variables.

 


Topic 145700, last updated on 18-Apr-2020