|
|||||
Function names | |||||
Prerequisite Concepts | Related Syntax |
A function's name must be a "plain" name -- it cannot be quoted, the way variable names are.
When a function is defined in an OmniMark program, the name of the function becomes a keyword in that program. If the function's name just happens to be the same as an OmniMark keyword, the OmniMark keyword cannot be used in that program -- the keyword always refers to the function.
It is generally best not to use OmniMark keywords as function names. (It's actually best not to use OmniMark keywords as variable names either.) However, there are enough different OmniMark keywords that OmniMark doesn't take the strong position of disallowing OmniMark keywords, it just says they can't coexist in the same program. This more flexible position also means that OmniMark programs will continue to work when new keywords are added to the language.
Note that the rule that you can't use a word as both a function name and an OmniMark keyword in the same program applies to the whole program -- it is an error to use a keyword early on in a program, and then later on define it as a function name.
Prerequisite Concepts Function types and anatomy Functions Keywords Names |
Related Syntax define function |
---- |