String case: Difference between revisions

→‎{{header|Fortran}}: Denouncing mystery constants.
(→‎{{header|Fortran}}: Ah yes, a lookup table.)
(→‎{{header|Fortran}}: Denouncing mystery constants.)
Line 1,026:
END DO</lang>
 
Note that in EBCDIC the offset is not 32 but 64. notRather than using an undocumented "magic constant" such as 32, one could define <code>PARAMETER (HIC = ICHAR("A") - ICHAR("a"))</code> instead or just place such code in-line and have hope for the compiler. This would also handle the small detail that "A" > "a" in EBCDIC rather than ASCII's "A" < "a". But alas, in EBCDIC the letter codes are ''not'' contiguous (there are many non-letter symbols between "a" and "z" as well as between "A" and "Z"), andso finally,the bounds of "A" >to "aZ" ratherwill than''not'' theisolate "A"only <letters "a"for of ASCIIattack. And it was not just IBM mainframes that used various versions of EBCDIC, so also did Burroughs, among others.
 
=={{header|FreeBASIC}}==
1,220

edits