##printkeywords [ VIRTUOSO CODE GENERATOR Reference Manual ] MPE/iX 5.0 Documentation
VIRTUOSO CODE GENERATOR Reference Manual
#printkeywords
Prints the current keyword-value pairs.
Syntax
#printkeywords [keyword=(keyword1,keyword2,...)] &
[ {current }]
# [scope={previous}]
printkey
keyword is a list of the keywords that should be printed. If no
keywords are specified, all keywords in the current
scope are printed.
scope specifies whether the keywords should come from the
current or previous scope.
Description
The #printkeywords construct prints the specified generator keywords
delimited by commas, or all keywords from the current or previous scope.
This construct can also be controlled by a conditional expression
initiated by the #if construct. The printed keywords are sent to the
generator listing file.
The above information can be used for debugging modules, models, and
macros. Use this construct in selected locations to make errors in
models or macros easier to locate.
Examples
EXAMPLE 1
#let image-database = "ORDERS"
#let image-dataset = "PRODUCT"
#let element-name = "PRODUCT-NUMBER"
#let number-one = 1
#block
#let element-name = "NEW-PRODUCT-NUMBER"
#let number-two = 2
#printkeywords
#endblock
.
.
.
The above example illustrates the use of #printkeywords construct. The
information that the construct writes to the GENLIST file includes that
shown below:
***Keyword Table Level 0
IMAGE-DATABASE = 'ORDERS'
IMAGE-DATASET = 'PRODUCT'
NUMBER-ONE = 1
ELEMENT-NAME = 'PRODUCT-NUMBER'
***Keyword Table Level 1
NUMBER-TWO = 2
ELEMENT-NAME = 'NEW-PRODUCT-NUMBER'
EXAMPLE 2
#if switch="DEBUG"
#printkeywords
#endif
The above example prints the keyword for the current scope only if the
the condition is true.
EXAMPLE 3
#printkeywords keyword=(A,B,C)
In the example above, only the keywords A, B, and C are printed. For
example, if A and B were assigned a value in level 0, and C and D we
assigned a value in level 1, the above example would look like this:
***Keyword Table Level 0
A=3
B=5
***Keyword Table Level 1
C=8
The keyword, D, would not be printed.
EXAMPLE 4
#printkeywords scope=current
In the above example, all of the keywords from the current scope are
printed. In the example on the previous page, the following would be
printed:
***Keyword Table Level 0
NUMBER-TWO = 2
ELEMENT-NAME = 'NEW-PRODUCT-NUMBER'
EXAMPLE 5
#printkeywords scope=previous
In this case, only the keywords from the previous scope are printed. In
the example on the previous page, the following would be printed:
***Keyword Table Level 0
IMAGE-DATABASE = 'ORDERS'
IMAGE-DATASET = 'PRODUCT'
NUMBER-ONE = 1
ELEMENT-NAME = 'PRODUCT-NUMBER'
MPE/iX 5.0 Documentation