4 ms·
All four "mother languages" (FORTRAN, ALGOL, COBOL, LISP) predate ASCII and EBCDIC. All four of them use whitespace as a token separator.
by hwayne 2y ago
All four "mother languages" (FORTRAN, ALGOL, COBOL, LISP) predate ASCII and EBCDIC. All four of them use whitespace as a token separator.
- erik_seaberg 2y agoNASA had a FORTRAN bug in 1963 that DO 10 I=1.10 wasn't a loop but an initialization of DO10I. The decimal point (not comma) made the spaces not matter.
- kazinator 2y agoIn fact, nope. The Fortran compiler people found themselves in uncharted territory and thought it would be a good idea to remove all the pesky spaces before scanning and parsing, so as not to have to deal with them. erik_seaberg's sibling comment is in connection with the situation that DOI=1.10 meant assigning the value 1.10 to variable DOI as in DOI = 1.10, whereas DOI=1,10 is the loop header DO I = 1, 10: stepping I from 1 to 10. Spaces would be written only for human readability, ignored similarly to comments. In fact, ignored harder than comments. For instance, in C, if we have DO/* comment */I, it doesn't become the token DOI; a removed comment is replaced by a space.
- hwayne 2y agoHuh, TIL!