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,CP1252 Path: g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!bcklog1.nntp.dca.giganews.com!nntp.bt.com!news.bt.com.POSTED!not-for-mail NNTP-Posting-Date: Sun, 09 Jul 2006 17:29:10 -0500 Date: Sun, 09 Jul 2006 23:29:10 +0100 From: Martin Dowie User-Agent: Thunderbird 1.5.0.4 (Windows/20060516) MIME-Version: 1.0 Newsgroups: comp.lang.ada,comp.lang.fortran,comp.lang.pl1 Subject: Re: Ada vs Fortran for scientific applications 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> In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit Message-ID: NNTP-Posting-Host: 81.157.117.224 X-AuthenticatedUsername: NoAuthUser X-Trace: sv3-9Hs+W1VgyE8YHnmAZq4FJ3kcmPaw0ELG75Yv9dE9pAWMwbw+mKWHWfu1meLsyb5V9qgua0PRkZ1kC6A!B26Ga13vHOubACH7atS37suqH5eup1jiF2IP9fBKunMD+cabwyIlDXIyzfZc82o5UmKGVWwlRec3 X-Complaints-To: abuse@btinternet.com X-DMCA-Complaints-To: abuse@btinternet.com X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.32 Xref: g2news2.google.com comp.lang.ada:5585 comp.lang.fortran:11860 comp.lang.pl1:1961 Date: 2006-07-09T23:29:10+01:00 List-Id: James Giles wrote: > All the stuff I elided is interesting. Many of the features are even > good things for languages to have. None of them were checks for > undefined variables. > > Given the Ada program fragment: > > COUNT, SUM : INTEGER; > > [... lots of code ...] > [... some paths through which assign to SUM ...] > [... and some don't ...] > > COUNT := SUM+1; -- is SUM defined here or not? > > In most Ada implementations, as for most other languages, all > the bit patterns in the representation of an INTEGER data type > are valid integer values. That's not entirely true, the standard states Integer must include the range �2**15+1 .. +2**15�1 - thus (usually) leaving -2**15 as a possible 'default uninitialized' value. Implementations /may/ do something else (e.g. on 32-bit architectures providing 'Integer' with the range -2**31+1 .. 2**31-1) and this should be stated in their own documentation (as per Annex M of the Ada language standard). Cheers -- Martin