ifsel: and endsel:

Function:

These macros are used to select or reject input lines for preprocessing. The selection code set by the the section called “select:” is compared with the code(s) entered as arguments of the ifsel: macro. If one of the codes 'match', the lines following the ifsel: macro are processed normally. If there is no match, lines up to the next ifsel: or endsel: macro are skipped.

Syntax:

ifsel:(code1,code2,....)
endsel:

code* is an alphanumeric string of characters of maximum length 10. Up to nine codes may appear in each ifsel: line and any number of ifsel: lines may follow consecutively. If no code is entered the default code is set as 'global' and will match any selection code (see Examples).

If one of the entered codes matches the selection code set by the select: macro the following statements are processed normally up to the next ifsel: or endsel: macro. If the entered codes do not match the selection code then the following statements are skipped until a match is found in a subsequent ifsel: macro, or a endsel: macro is encountered. The preprocessor treats a sequence of ifsel: macros in the same way as a sequence IF/ELSEIF commands. The first ifsel: code to match the selection code is executed and all subsequent ifsel:'s are rejected until an endsel: is encountered. An ifsel: macro with no arguments acts like a ELSE command in the sequence.

Note that if the number of characters in code is less than in the selection code set by select: then only this number of characters is used in the matching process. This means that the ifsel: code 'IBM' will match with the selection code 'IBMMVS'. This form of 'generic' selection must be used carefully.

Examples:

ifsel:(UNXSUN)
statements #1
ifsel:(DEC10,VAX,PE,ASCII)
statements #2
ifsel:(IBM,EBCDIC)
statements #3
ifsel:
statements #4
endsel:

If the selection code set by a prior select: is VAX780 then only the statements #2 will be processed in the above sequence. Note that these statements need not be enclosed within braces in contrast to 'statement blocks'. If select:(UNX) or select:(CRAY) precede the above sequence only statements #4 will be processed.