Chapter 9 Generation Reference Guide (GTL)
The purpose of the unique macro is to define a block in which each line of the text generated is guaranteed to be unique. It can be useful for calculating imports, includes, typedefs, or forward declarations in languages such as Java, C++ or C#.
.unique <unique-block-input> .endunique['(' <tail> ')']
Parameter | Type | Description |
---|---|---|
<unique-block-input> | Complex template | Parameter used to input text |
<tail> | Text | Appended to the output, if there is one |
The output is the unique block input where every redundant line has been removed.
Example:
.unique import java.util.*; import java.lang.String; %imports% .endunique
Copyright (C) 2005. Sybase Inc. All rights reserved. |