I see that Fortran uses the underscore in integer and real literals as a special suffix delimiter, followed by a code number or name to indicate
the type of the literal. Pity they didn’t follow the convention in some other languages, where this is ignored so it can be used as a grouping delimiter, just for readability, to avoid the “drowning in digits” effect.
E.g. in Python this is a valid integer literal
18_446_744_073_709_551_615
and this is a valid real literal:
3.141_592_653_589_793
I see that Fortran uses the underscore in integer and real literals as a special suffix delimiter, followed by a code number or name to indicate
the type of the literal. Pity they didn’t follow the convention in some other languages, where this is ignored so it can be used as a grouping delimiter, just for readability, to avoid the “drowning in digits” effect.
E.g. in Python this is a valid integer literal
18_446_744_073_709_551_615
and this is a valid real literal:
3.141_592_653_589_793
Well, whatever the merits of this may be, I don't believe that, back in
the mid-1980s when Fortran 90 was more-or-less defined, there was any 'convention' to follow.
I see that Fortran uses the underscore in integer and real literals as a special suffix delimiter, followed by a code number or name to indicate
the type of the literal. Pity they didn’t follow the convention in some other languages,
So, I think we should ask latecomers like Python to change.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 376 |
Nodes: | 16 (0 / 16) |
Uptime: | 14:11:21 |
Calls: | 7,994 |
Calls today: | 4 |
Files: | 13,022 |
Messages: | 5,820,521 |