The following operators are supported in GTL:
Symbol |
Description |
---|---|
* |
Dereferencing operator - 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). If 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). |
! |
Power evaluation operator - Evaluates the results of the evaluation of the variable as a template. For example, you define a comment containing a variable like %Code%. When you use the ! operator in %!Comment%, the actual value of %Code% is substituted for the variable block. Without the ! operator, the variable remains unevaluated. The ! operator may be applied any number of times. For example: %!!template% This outputs the results of the evaluation of the evaluation of the evaluation of template 'template' |
? |
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. For example, if custname is defined whereas custid is not, then the template: .set_value(foo, tt) %custname?% %custid?% outputs: true false |
+ |
The + operator is used to test if an object property is visible in the interface. For example, you could test if the Type box is displayed in the General tab of a database property sheet in an ILM, and thus that the Replication Server or MobiLink XEM is attached to the model. The %Database.Type+% template will output false if no XEM is attached to the model. |