Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.compilers > #3504
| From | Thomas Koenig <tkoenig@netcologne.de> |
|---|---|
| Newsgroups | comp.compilers |
| Subject | Re: modifying constants in Fortran and elsewhere |
| Date | 2023-07-16 13:08 +0000 |
| Organization | Compilers Central |
| Message-ID | <23-07-008@comp.compilers> (permalink) |
| References | <23-07-003@comp.compilers> <23-07-006@comp.compilers> |
Our esteemed moderator wrote: > [The constant stomping issue far predates S/360. As soon as Fortran II > added subroutines on the 704, there were constant arguments you could > change by mistake. The problem is that it took quite a while for people > to sort out the differences among call by reference, call by value, > and call by copy in/out. Fortran on the 70x and S/360 user reference > for array arguments, copy in/out for scalars. I just have the IBM System/360 Operating System FORTRAN IV (H) Programmer's Guide, Fourth Edition, open (isn't Bitsavers great?). It states, on page 108 Argument List The argument list contains addresses of variables, arrays, and subprogram names used as arguments. Each entry in the argu- ment list is four bytes and is aligned on a full-word boundary. The last three bytes of each entry contain the 24-bit address of an argument. The first byte of each entry contains zeros, unless it is the last entry in the argument list. If this is the last entry, the sign bit in the entry is set on. So, apparently no copy in/out on that particular compiler, at least. It also shows the (ab)use that was possible of the uppermost byte, because clearly 24 bits are enough for everybody and for all time, right? :-) [See the 360 Fortran IV Language manual, where on pages 90-95 it explains copy in/out and how to avoid it by putting slashes around the dummy argument names. https://bitsavers.org/pdf/ibm/360/fortran/C28-6515-7_System_360_FORTRAN_IV_Language_1966.pdf I was there, I actually used this stuff. Re abuse of the upper byte, as the size of OS/360 exploded way past what they expected, programmers were under pressure to make every bit and byte count, hence overloading the high byte. -John]
Back to comp.compilers | Previous | Next — Previous in thread | Next in thread | Find similar
modifying constants in Fortran and elsewhere gah4 <gah4@u.washington.edu> - 2023-07-10 19:42 -0700
Re: modifying constants in Fortran and elsewhere Thomas Koenig <tkoenig@netcologne.de> - 2023-07-15 10:57 +0000
Re: modifying constants in Fortran and elsewhere Hans-Peter Diettrich <DrDiettrich1@netscape.net> - 2023-07-16 11:56 +0200
Re: modifying constants in Fortran and elsewhere Thomas Koenig <tkoenig@netcologne.de> - 2023-07-16 13:08 +0000
Re: modifying constants in Fortran and elsewhere gah4 <gah4@u.washington.edu> - 2023-07-16 19:09 -0700
Re: modifying constants in Fortran and elsewhere gah4 <gah4@u.washington.edu> - 2023-07-17 10:51 -0700
Re: modifying constants in Fortran and elsewhere gah4 <gah4@u.washington.edu> - 2023-07-16 19:17 -0700
Re: modifying constants in Fortran and elsewhere David Brown <david.brown@hesbynett.no> - 2023-07-17 13:09 +0200
csiph-web