![]() ![]() ![]() ![]() ![]() ![]() ![]() |
|||||
|
|
|||||
| operator | literal | ||||
| Related Syntax | Related Concepts | ||||
Syntax
literal keyword (literal keyword)+
If you have redefined an OmniMark identifier using a macro and you want to refer to the OmniMark identifier rather than invoke the macro, you can precede the identifier with literal:
macro open token foo is
do
open foo as file
done
macro-end
process
open fred
literal open bar as buffer
You can also use literal in a macro definition to allow the keywords arg, token, literal, and is to be used as part of the macro name or argument delimiter, and to allow the keyword macro-end to appear in the macro definition:
macro const arg name = token value is
literal macro name
literal is value
literal macro-end
macro-end
const mary = "Mary had a little lamb%n"
process
output mary
This sample lets you use Basic style const declarations instead of macros for declaring constants. Redefining small bits of OmniMark in this way makes for clear and simple examples, but not necessarilly for maintainable OmniMark code, so use with caution.
|
Related Syntax macro |
Related Concepts Writing robust macros |
| ---- |