From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,c4cb2c432feebd9d X-Google-Thread: 1094ba,c4cb2c432feebd9d X-Google-Thread: 101deb,15c6ed4b761968e6 X-Google-Attributes: gid103376,gid1094ba,gid101deb,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!sn-xt-sjc-15!sn-xt-sjc-01!sn-post-sjc-01!supernews.com!news.supernews.com!nospam From: nospam@see.signature (Richard E Maine) Newsgroups: comp.lang.ada,comp.lang.fortran,comp.lang.pl1 Subject: Re: Ada vs Fortran for scientific applications Date: Tue, 11 Jul 2006 08:55:41 -0700 Organization: NASA Dryden Message-ID: <1hiayuk.4mm8dzknzt0nN%nospam@see.signature> References: <0ugu4e.4i7.ln@hunter.axlog.fr> <%P_cg.155733$eR6.26337@bgtnsc04-news.ops.worldnet.att.net> <6H9dg.10258$S7.9150@news-server.bigpond.net.au> <1hfv5wb.1x4ab1tbdzk7eN%nospam@see.signature> <2006052509454116807-gsande@worldnetattnet> <1kzktalo9krea$.z8n9wev45xct$.dlg@40tude.net> <_5idnW0Lk4kxXS7ZnZ2dnUVZ_oOdnZ2d@comcast.com> User-Agent: MacSOUP/2.7 (Mac OS X version 10.4.7) X-Complaints-To: abuse@supernews.com Xref: g2news2.google.com comp.lang.ada:5618 comp.lang.fortran:11945 comp.lang.pl1:1985 Date: 2006-07-11T08:55:41-07:00 List-Id: glen herrmannsfeldt wrote: > John W. Kennedy wrote: > > > (Java is the only language I know of that will actually fail the compile > > unless it /knows/ that every variable is initialized before use in every > > possible path.) > > I am not sure what the language specification says, but Sun compilers > do that. (Note: for scalars only, not arrays.) I don't believe you. Reread what John actually wrote instead of what you were probably thinking about. Do you really claim that the Sun compiler will "fail compilation" (which is not the same thing as give a warning) if it does not "know" that every scalar variable is set before use in every possible path. An awful lot of Fortran codes would fail compilation in that case - enough of them that Sun would feel the backlash rather strongly. It would also violate the Fortran standard, as those codes are perfectly conforming to the Fortran standard, which only requires that the variables be defined when they are actually referenced (i.e. in the path that is taken - not in some other path that is staticaally possible, but is not taken). That Sun might have a warning, I could believe (though it expect such a warning to be verbose enough that few people would use it). I could also even more believe that Sun might fail compilation if it could prove at compile time that a variable would be used without being defined. But neither of those are equivalent to what John said. -- Richard Maine | Good judgment comes from experience; email: my first.last at org.domain| experience comes from bad judgment. org: nasa, domain: gov | -- Mark Twain