General directives have the following syntax.
!DIR$ d1, d2, ...
A general directive line is defined as follows.
Spaces before, after, or within a directive are ignored.
Letters of a directive line can be in uppercase, lowercase, or mixed.
The form varies for fixed-form and free-form source as follows.
Put CDIR$ or !DIR$ in columns 1 through 5.
Directives are listed in columns 7 and beyond.
Columns beyond 72 are ignored.
An initial directive line has a blank in column 6.
A continuation directive line has a nonblank in column 6.
Put !DIR$ followed by a space anywhere in the line. The !DIR$ characters are the first nonblank characters in the line (actually, non-whitespace).
Directives are listed after the space.
An initial directive line has a blank, tab, or newline in the position immediately after the !DIR$.
A continuation directive line has a character other than a blank, tab, or newline in the position immediately after the !DIR$.
Thus, !DIR$ in columns 1 through 5 works for both free-form source and fixed-form source.