next up previous contents index
Next: The eval Keyword: Expression Up: Technology File Macros Previous: Technology File Macros   Contents   Index


The Set Keyword: Variable Expansion

A different type of macro is defined using the Set keyword, where the words following are parsed into three tokens

Set name = value

This type of macro is referred to by

$(name)

which is replaced by value as the file is read. If the name has not been assigned in a Set line, but an environment variable by that name is found, the substitution will be made from the value of the environment variable. Otherwise, the variable must be set before being referenced, meaning that the Set line must appear before the first reference in the technology file.

Neither the name or value tokens can contain a carriage return, though they can contain embedded white space. In either case, the beginning and end of the token is the first and last non-white character. Substitution is performed recursively. The two types of macro can be mixed, though the Set line is not expanded for Define'ed macros. Other lines are first expanded for Define'ed macros, then for Set macros.

The Set keyword should not be confused with the !set command, which can also appear in the technology file.


next up previous contents index
Next: The eval Keyword: Expression Up: Technology File Macros Previous: Technology File Macros   Contents   Index
Stephen R. Whiteley 2024-09-29