Chapter 9 Generation Reference Guide (GTL)


Local variables

Local variables are only visible in the scope where they are defined and inside its inner scopes.

Local variables may be defined through the use of the set_object and set_value macros.

For more information on the set_object and set_value macros, see the "set_object macro", and the "set_value macro"sections.

Dereferencing operator

Variables defined through the set_object macro are referred to as local objects, whereas those defined with the set_value macro are called local values. The * dereferencing operator may be applied to local values.

The * operator allows for the evaluation of the variable whose name is the value of the specified local variable.

'%'['.' <formatting-options> ':'] '*' <local-variable>'%'

For example, the following code:

.set_value(i, Code)
%*i%

Is equivalent to:

%Code%

 


Copyright (C) 2005. Sybase Inc. All rights reserved.