Versions of OmniMark prior to V3 required a type herald to precede every variable name in any context where variables of different types were allowed. The herald had three purposes:
- Heralds made it clear when variables were referenced. When a new keyword was introduced to OmniMark, a herald would clearly distinguish a variable with the same name from the keyword. This would allow older programs to keep working as OmniMark evolved.
- Heralds allowed programmers to write programs with no variable declarations. The herald ensured that OmniMark always had enough information to know the type of each variable referenced.
- Heralds enhanced readability. When the keyword form of operators is used, the herald emphasizes the variable name.
With the punctuational operators, heralds can actually detract from readability. Therefore, as of the release of OmniMark V3, heralds are no longer required in most contexts. Heralds are only needed for OmniMark variables in two cases:
- When a quoted string is used as an OmniMark variable name.
- When the variable being referenced would be hidden by a variable of the same name and different type in a lower nested scope. Even in this case, it is wiser to rename one of the variables, rather than using a herald.
OmniMark always requires heralds for the names of SGML objects.
Generated: April 21, 1999 at 2:00:49 pm
If you have any comments about this section of the documentation, send email to [email protected]
Copyright © OmniMark Technologies Corporation, 1988-1999.