An integer index is associated with each switch format segment in the switch format list. The indexes are 0, 1, 2, and so on through N–1, where N is the number of switch format segments in the list. These indexes are obtained by counting the switch format segments in order of their appearance in the list. A switch format segment in the list can be referenced by subscripting the switch format identifier with a subscript whose value is equal to the index of the switch format segment.
If a subscript to a switch format identifier yields a value outside the range of the switch format list (that is, less than 0 or greater than N–1), a fault occurs at run time.
Any subscripts in the switch format list are evaluated at the time the subscripted switch format identifier is encountered.
A switch format can reference itself in the switch format list, in which case a stack overflow might occur when the program is executed. For example, assume a switch format is declared as the following:
SWITCH FORMAT SF := FMT1, FMT2, SF[N]
If N equals 2, the subscripted switch format identifier SF[N] references itself indefinitely.
A simple string literal in a SWITCH FORMAT declaration is always read-only if the switch format segment in which it appears consists of editing specifications rather than a format designator.

