Chapter 3 Generator Constructs
This chapter presents information on each of the Virtuoso Generator
constructs. The generator constructs are commands that instruct the
Virtuoso Generator to perform specific actions which determine the text
that is generated. The constructs retrieve definitions stored in the
System Dictionary, specify looping and conditional evaluations and flow
of control when generating output, and control the appearance of
generated text and quoted strings.
The following table provides a brief overview of each generator construct
and lists the page number where detailed reference information is
provided for the construct.
Table 3-1. Generator Constructs
-----------------------------------------------------------------------------------------------
| | | |
| Construct Name | Function | Page |
| | | No. |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| #block/#endblock | Designates a scope for keywords defined | 3-4 |
| | between the #block (begin scope) and | |
| | #endblock (end scope). | |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| #comment | Provides in-line documentation for | 3-7 |
| | statements. | |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| #description | Generates a comment block for either COBOL | 3-8 |
| | or text. | |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| #entry/endentry | Defines a block of text that is to be | 3-12 |
| | included in a specified section. | |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| #for/#endfor | Retrieves all of the relationship | 3-15 |
| | occurrences of a specified relationship | |
| | type from the System Dictionary. | |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| #getent | Retrieves the attributes of a specified | 3-19 |
| | entity from the System Dictionary. | |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| #getrel | Retrieves a relationship of a specified | 3-21 |
| | relationship type from the System | |
| | Dictionary. | |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| #if/#else/#endif | Instructs the generator to evaluate a set | 3-25 |
| | of statements if conditional evaluations | |
| | are true. | |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| #include | Directs the generator to process a | 3-28 |
| | specified file. | |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| #let | Assigns a value to a keyword. | 3-29 |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| #macro/#endmacro | Designates the beginning and the end of a | 3-31 |
| | macro. | |
| | | |
-----------------------------------------------------------------------------------------------
Table 3-1. Generator Constructs (continued)
-----------------------------------------------------------------------------------------------
| | | |
| Construct Name | Function | Page |
| | | No. |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| #option | Changes generator defaults to specified | 3-33 |
| | values. | |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| #printerror | Writes a message to the generator listing | 3-36 |
| | file. | |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| #printkeywords | Prints the current keyword-value pairs. | 3-38 |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| #return | Used to return from a FOR or WHILE loop or | 3-40 |
| | to return from a MACRO or INCLUDE file. | |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| #returnvalue | Assigns a value to a keyword in the | 3-41 |
| | previous scope. | |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| #section | Defines a section of text in which | 3-43 |
| | generated text can be placed. | |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| #while/#endwhile | Loops through a range of statements while a | 3-44 |
| | conditional expression is true. | |
| | | |
-----------------------------------------------------------------------------------------------