Search Top Index
HELP NONSYNTAX John Gibson December 82 nonsyntax <syntax word> NONSYNTAX preceding the name of a syntax word tells the compiler not to treat it as such, but instead to treat it as a reference to a variable. Thus for example nonsyntax [ -> f; assigns to F the procedure "[" that is called by the compiler to read a list constructor expression following the opening "[". F can then be called to do the same, but only in the context of compilation or of code planting, e.g. define syntax bra; f(); enddefine; bra 1 2 3 4] => ** [1 2 3 4] The word NONSYNTAX is essential here; an attempt to use a statement like [ -> f; would simply cause the compiler to think this was the beginning of a list with first 3 elements "->", "F" and ";". Note that not all syntax words contain procedures as their values; only those which can OPEN a syntactic construct do so (the procedures are called to read that construct). Thus words like *ELSE, *ENDIF and *ENDPROCEDURE do not contain procedures. NONSYNTAX performs the same 'escaping' role as NONOP does for operators and NONMAC does for macros - see HELP *NONOP and HELP *NONMAC.