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!border1.nntp.dca.giganews.com!nntp.giganews.com!newscon06.news.prodigy.com!prodigy.net!newsdst02.news.prodigy.com!prodigy.com!postmaster.news.prodigy.com!newssvr27.news.prodigy.net.POSTED!4988f22a!not-for-mail From: Newsgroups: comp.lang.ada,comp.lang.fortran,comp.lang.pl1 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> Subject: Re: Ada vs Fortran for scientific applications X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-RFC2646: Format=Flowed; Response Message-ID: NNTP-Posting-Host: 70.134.98.164 X-Complaints-To: abuse@prodigy.net X-Trace: newssvr27.news.prodigy.net 1152478321 ST000 70.134.98.164 (Sun, 09 Jul 2006 16:52:01 EDT) NNTP-Posting-Date: Sun, 09 Jul 2006 16:52:01 EDT Organization: SBC http://yahoo.sbc.com X-UserInfo1: F[OQB\CEBZUWSSD[N[O@_WH@YR_B@EXLLBWLOOAFJYWZUYICD^RAQBKZQTZTX\_I[^G_KGFNON[ZOE_AZNVO^\XGGNTCIRPIJH[@RQKBXLRZ@CD^HKANYVW@RLGEZEJN@\_WZJBNZYYKVIOR]T]MNMG_Z[YVWSCH_Q[GPC_A@CARQVXDSDA^M]@DRVUM@RBM Date: Sun, 09 Jul 2006 20:52:01 GMT Xref: g2news2.google.com comp.lang.ada:5582 comp.lang.fortran:11857 comp.lang.pl1:1959 Date: 2006-07-09T20:52:01+00:00 List-Id: "Gordon Sande" wrote in message news:2006052509454116807-gsande@worldnetattnet... > > How many Ada systems can match the undefined variable checking of the > old WatFor or the current Salford CheckMate or the Lahey/Fujitsu > global checking? It seems to be a thing associated with places that > run student cafteria computing on mainframes. Not much used anymore. > There was a similar student checkout PL/I from Cornell if I recall > correctly. > The default for Ada is to do thorough range checking on all numeric types. A designer may suppress that default, selectively, if it is deemed unnecessary. Ada allows the explicity declaration of range constraints, bit mapping, and other low-level features. Examples: type My_Number is range 3..56; -- sets the upper and lower bounds -- on an integer type type My_Float is digits 7 range -200.0 .. 500.0; -- sets the number of digits -- and the range for this type These are just two examples. The same thing can be done for decimal types, modular types, fixed-point types, etc. Ada also uses the name-equivalence, rather than the structural equivalence approach to checking (at compile time). Therefore, type N1 is range 0..100; type N2 is range 0..100; with X : N1; -- X is of type N1 Y : N2; -- Y is of type N2; will reject, X := Y +1; Y is incompatible, by name, with X; Some languages will accept the above statement because the two values have types that are structurally equivalent. One of the principle features of Ada is the rigor of its checking both at compile-time and run-time. This includes indices, ordinary numeric types, subscripts, etc. Richard Riehle