To: J3 J3/23-117 From: Malcolm Cohen Subject: Suggestion for F202Y Date: 2023-February-07 1. Discussion The Fortran standard does not specify what happens with TAB characters in source code, and in particular, in free form source. A number of editor programs convert blanks to tabs (sometimes automatically), or insert tabs when auto-indenting. If TABs were not permitted by the processor, this would be inconvenient. I am not aware of any processors that prohibit TABs, though several produce diagnostic messages when a standards conformance option is used. The NAG compiler does not issue such diagnostic messages, interpreting a TAB character in the input, when outside of character context, as an additional encoding for the blank character. Under that interpretation, no diagnostic is required. It should be noted that this is not about Fortran 77 "TAB format", where in fixed source form, TABs have special meaning (approximately, move to column 5 or 6, depending on context). This is only discussing free form. It would be good for the standard to specify what happens here. Requiring processors to produce diagnostic messages for TABs does not seem like a useful thing to do. Finally, I note that the C language "isblank" function returns true both for blank and for horizontal tab. That means that many people are familiar with the idea that a tab is just another form of blank. 2. Proposal That in free form source, if the processor character set includes a horizontal tab character, appearance of such a character outside of character context is treated exactly the same as a single blank. 3. Possible extension We could also specify that tabs are treated as blanks in formatted input as well. This has obvious advantages in interoperating with C programs. Fortran processors that share an i/o library with the same vendor's C processor will likely already do this. 4. Formalities A. "Use cases" There is no real functionality here, just convenience, and elimination of annoying diagnostics. (And if the i/o extension is adopted, ease of processing of formatted files that contain tabs.) B. Formal requirements / specifications / syntax This is a lexical issue, and so these are all the same: allow tabs in free form source. C. Edits To be supplied. ===END===