Contents | Parent Topic | Previous Topic | Next Topic
Home | Catalog
Expressions are used in several places within SDF including:
The value of an expression can be placed into a paragraph by delimiting it with the special symbols [[ and ]]. For example:
The current file is [[DOC_FILE]].
An expression is either:
If an expression is a single word, it is the value of a variable. Otherwise, it is evaluated as a Perl expression. A Perl expression is typically one of the following:
Within a Perl expression, SDF variables are available via the var associative array. The syntax used by Perl for accessing a value within an associative array is:
"$" array_name "{" string_index "}"
Some examples are:
length($var{'DOC_AUTHOR'})
"$var{'DOC_NAME'} $var{'DOC_TYPE'}"
Contents | Parent Topic | Previous Topic | Next Topic
Home | Catalog