Chapter 9 Generation Reference Guide (GTL)
The following operators are supported in GTL:
The syntax ['*']+ <local-value> ['('<parameter-list>')'] returns the object member defined by the evaluation of ['*']+ <local-value>. If the given object member happens to be a template, a parameter list may be specified. Applying the star operator corresponds to a double evaluation (the * operator acts as a dereferencing operator).
Suppose a local variable is defined as: .set_value(C, Code)
Then %C%
will return "Code" and %*C%
will return the result of the evaluation of %Code%. In other words, %*C%
can be thought of as %(%C%)%
(the latter syntax being invalid).
The ? operator is used to test the existence of a template, a local variable, a volatile or an extended attribute. It returns "true" if the variable exists, "false" otherwise.
Example:
Template
.set_value(foo, tt) %custname?% %custid?%
outputs:
true false
as custname is defined whereas custid is not.
The + operator is used to test if an object property is visible in the interface.
Example:
You can test if the Type box is displayed in the General tab of a database property sheet in the Information Liquidity Model, this indicates if the Replication Server or MobiLink extended model definitions are attached to the current model.
You have to define the %Database.Type+% template, it will output false if no extended model definition is associated with the current model.
Copyright (C) 2005. Sybase Inc. All rights reserved. |