Chapter 9 Generation Reference Guide (GTL)


set_object macro

This macro is used to define a local variable of object type (local object).

.set_object '(' <local-var-name> [',' <object-ref>[',' <new> ]] ')'

Parameters

Parameter Type Description
<local-var-name> Simple-template Variable name
<object-ref> (optional) [<scope>.]<object-scope>] Describes an object reference. If it is not specified or is an empty string, the variable is a reference to the active object in the current translation scope
<new> (optional, default value = update) new or update or newifundef If new, (re)define the variable in the current scope. If update, if a variable with the same name already exists, update the existing variable otherwise define a new one. If newifundef, define the variable in the current scope if it has not been defined in an outer scope, otherwise do nothing.

The variable is a reference to the object specified using the second argument.

Example:

.set_object(Attribute1, Attributes.First)

Note   Note
When specifying a new variable, it is recommended to specify 'new' as third argument to ensure that a new variable is created in the current scope.

 


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