Next: , Previous: , Up: Options   [Contents][Index]


4.2.41 ‘-n!’: Make ‘!’ denote short comment [FORTRAN]

In FORTRAN-90, ‘!’ starts a short comment. However, by default FWEB usurps ‘!’ for the logical not, as in ‘if(x != y)’. To force it to recognize ‘!’ as a comment, use ‘-n!’. However, the recommended style is to use FWEB’s standard convention that ‘//’ denotes the start of a short comment (see -n/). See also -! and -r!.

In FORTRAN-77, to include the exclamation point inside a string, escape it with a backslash, as in

        s = "A \! inside a string"

This possibly annoying restriction arises because the unduly complicated FORTRAN input driver does some preprocessing of the FORTRAN source before it feeds it to the cores of the processors.