Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.compilers > #3014
| From | gah4 <gah4@u.washington.edu> |
|---|---|
| Newsgroups | comp.compilers |
| Subject | Re: Fortran to C/C++ translation: a running example. |
| Date | 2022-05-21 09:31 -0700 |
| Organization | Compilers Central |
| Message-ID | <22-05-041@comp.compilers> (permalink) |
| References | <22-05-032@comp.compilers> <22-05-038@comp.compilers> |
On Saturday, May 21, 2022 at 8:54:47 AM UTC-7, Lydia Marie Williamson wrote: (snip on COMMON and EQUIVALENCE) > This is not exactly correct. It's "common blocks" that were handled in this > way. > In the Fortran source of Zork/dungeon, the "equivalence" statements and > "common blocks" were used together, so it's easy to get the issue confused. I > don't know if their being used together is something that always happened in > Fortran, or if it was just particular to this program. COMMON and EQUIVALENCE are closely related in the Fortran standard, and in the implementation by compilers. A variable equivalenced to a variable in common, is also in common. Such variable can extend the length of the common block, but only at the end, not the beginning. It used to be that compilers would print out a variable map, with the address, or offset, of each variable, and its length and type. That was often useful to be sure that the compiler did what you thought it did. Also, it would include the length of each common block, again good to check to be sure they agree with what you expect. The Fortran standard has a C interoperability feature that explains how Fortran features and C features work together.
Back to comp.compilers | Previous | Next — Previous in thread | Next in thread | Find similar
Fortran to C/C++ translation: a running example. Rock Brentwood <rockbrentwood@gmail.com> - 2022-05-16 12:27 -0700
Re: Fortran to C/C++ translation: a running example. Thomas Koenig <tkoenig@netcologne.de> - 2022-05-17 14:59 +0000
Re: Fortran to C/C++ translation: a running example. Lydia Marie Williamson <lydiamariewilliamson@gmail.com> - 2022-05-20 16:34 -0700
Re: Fortran to C/C++ translation: a running example. gah4 <gah4@u.washington.edu> - 2022-05-21 09:31 -0700
Re: Fortran to C/C++ translation: a running example. Thomas Koenig <tkoenig@netcologne.de> - 2022-05-21 17:24 +0000
csiph-web