ambiguous ?
Jim Giles
jlg at lanl.gov
Thu Oct 19 08:03:13 AEST 1989
>From article <1989Oct17.203733.23121 at utzoo.uucp>, by henry at utzoo.uucp (Henry Spencer):
> I could have sworn that a good many things were officially undefined in
> Fortran (66 or 77, take your pick), such as the values of local variables
> after return from a function. I could be wrong -- I'm not a Fortran guru.
That's a different definition of _undefined_ and you know it. The Fortran
use is a description of the status of those variables. In C, the _behaviour_
of the program is what's undefined. The closest thing in Fortran is the
explicit optimization allowed in expressions (ie. the expression can be
reordered in by _mathematically_ valid identities). However, Fortran
provides an _efficient_ way to override such optimization. C has _many_
more contexts which are _both_ undefined and without efficient ways
of overriding the ambiguity.
This is not to say that Fortran is perfect - it isn't. But it is a better
defined and more clearly specified language. I know several people who
don't use C simply because its behaviour is deliberately undefined and
there is no clear way of explicitly overriding such ambiguities.
More information about the Comp.lang.c
mailing list