Search                        Top                                  Index
HELP SMATCH                                         JL Cunningham, 11 Nov 1983

This is made redundant by the introduction of the new pattern prefix "!"



LIB SMATCH is a library program that defines a macro intended for use mainly
in patterns used inside sections. For example:

    section $-test => prelist;

    define prelist(list,word) -> pre;
        list --> [??pre ^word ==]


This won't work as desired, because the local result "pre" is not the same
variable as will be used by the matcher. LIB SMATCH defines "!" as a macro
to substitute the WORD_IDENTIFIER for a word. In the above example, you
would do:

        list --> [?? ^ !pre ^word ==];

The spaces either side of the "^" are necessary.

See REF *SECTIONS for details on the use of sections in POP-11.

See also HELP
    *SECTIONS        - on defining sections in POP-11
    *POP_SECTION     - on the value and use of POP_SECTION
    *CURRENT_SECTION - on accessing and changing current section
    *SECTION_CANCEL  - how to cancel a section
    *GLOBAL          - on the use of global identifiers in POP-11