Chapter 9 Generation Reference Guide (GTL)
This macro is used to define a local variable of value type.
.set_value '(' <local-var-name> ')' <value>[',' <new> ')'
Parameter | Type | Description |
---|---|---|
<local-var-name> | Simple template | Variable name |
<value> | Simple template (escape sequences ignored) | Value |
<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 value is set to be the translated template value specified as the second argument.
Example:
.set_value(FirstAttributeCode, %Attributes.First.Code%)
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. |