An identifier, which is a variable or a function call, becomes visible, meaning that it can be referenced when it is declared or instantiated. The region where an identifier is visible is called its scope. The five types of scope are:
An identifier has global scope if you can reference it anywhere within a macro. Identifiers that have global scope are:
An identifier has this scope if its declaration appears outside of any block. A block starts with an opening bracket ({) and ends with a percent sign and bracket (%}). (Note that DEFINE blocks are excluded from this definition and should be treated as separate DEFINE statements.) Unlike an identifier with global scope, one with macro scope can only be referred to by items in the macro that follow the idenfier's declaration.
An identifier has function block scope if:
If an identifier with the same name already exists outside the function definition, then Net.Data uses the identifier from the function parameter list within the function block.
An identifier does not have function block scope if it has been declared or initialized outside of the function and is not declared in the function parameter list. The value of the identifier within the function block remains unchanged unless updated by the function.
An identifier has report block scope if it can be referenced only from within a REPORT block (for example, table column names N1, N2, ..., Nn). Only those variables that Net.Data implicitly defines as part of its table processing can have a report block scope. Any other variables that are instantiated have function block scope.
An identifier has row block scope if it can only be referenced from within a ROW block (for example, table value names V1, V2, ..., Vn). Only those variables that Net.Data implicitly defines as part of its table processing can have a row block scope. Any other variables that are instantiated have function block scope.