Re: No enumeration data type in Fortran?
- From: glen herrmannsfeldt <gah@xxxxxxxxxxxxxxxx>
- Date: Thu, 06 Jul 2006 16:08:17 -0700
Richard E Maine wrote:
glen herrmannsfeldt <gah@xxxxxxxxxxxxxxxx> wrote:
I tried to find that in K&R2, but didn't see it. My guess is that a
compiler that makes one [enum] other than int won't work with a F2003
interop, though.
I don't know why. A lot of trouble was put into making f2003 so that it
would work with such. Some people think it was too much trouble for the
benefit (particularly when considering the observed paucity of C
compilers that don't make all enums int). I'm no fan of the feature, but
people who worked on it certainly were intending it to work with such
compilers, and they knew more about the subject than I did or do.
Well, the cases I was thinking of involve pass by reference, especially between Fortran and C. If you don't allow that, then I suppose there is no problem. C doesn't allow passing the address of a constant, so you
can't pass one by reference. Otherwise, having a constant a different
size than the corresponding variable gets things very confused.
-- glen
problem.
.
- Prev by Date: Re: Size of Integer in Fortran 77
- Next by Date: Re: Retro FORTRAN IV - Snoopy Calendar
- Previous by thread: Syntax question
- Next by thread: Re: CVF compiler question, program giving inconsistent results
- Index(es):
Relevant Pages
|