Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!purdue!haven!adm!cmcl2!lanl!jlg From: jlg@lanl.gov (Jim Giles) Newsgroups: comp.lang.c Subject: Re: ambiguous ? Message-ID: <14091@lanl.gov> Date: 18 Oct 89 22:03:13 GMT References: <1989Oct17.203733.23121@utzoo.uucp> Organization: Los Alamos National Laboratory Lines: 18 From article <1989Oct17.203733.23121@utzoo.uucp>, by henry@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.