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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,c4cb2c432feebd9d X-Google-Thread: 1094ba,c4cb2c432feebd9d X-Google-Attributes: gid103376,gid1094ba,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!news.glorb.com!cycny01.gnilink.net!spamkiller.gnilink.net!gnilink.net!trnddc06.POSTED!87bf9b22!not-for-mail From: Dan Nagle Reply-To: dnagle@erols.com Organization: Purple Sage Computing Solutions, Inc. User-Agent: Thunderbird 1.5.0.2 (X11/20060420) MIME-Version: 1.0 Newsgroups: comp.lang.ada,comp.lang.fortran 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> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Date: Thu, 25 May 2006 12:42:57 GMT NNTP-Posting-Host: 70.108.4.182 X-Complaints-To: abuse@verizon.net X-Trace: trnddc06 1148560977 70.108.4.182 (Thu, 25 May 2006 08:42:57 EDT) NNTP-Posting-Date: Thu, 25 May 2006 08:42:57 EDT Xref: g2news2.google.com comp.lang.ada:4455 comp.lang.fortran:10237 Date: 2006-05-25T12:42:57+00:00 List-Id: Hello, I've trimmed c.l.pl1 to stay on-topic. Dr. Adrian Wrigley wrote: > A couple of questions about Fortran: > Are bounds check failures trappable in a standard way so the > program can continue? Generally, no. The Fortran standard has never defined compiler directives, or what Ada calls pragmas. These are always defined by the compiler vendor. Whether the vendor chooses to report-and-continue or report-and-stop might be controllable or might not, depending on other compiler options. There is also an interaction with the Fortran 66 practice of declaring assumed size arrays to have an extent of 1, again, practice varies by vendor. > Can it be controlled on a finer grain than per compilation? Well, per compilation unit (roughly, procedure). > Do user defined numerical types have restricted bounds too? This can be done via a user defined assignment, but it must be written by the application programmer. > The adverse consequences of exceeding bounds can be seen to > outweigh the (usually) modest costs in code size and performance that > even mature code should ship with checks enabled, IMO. > Compilers generally should be shipped with the 'failsafe' > options on by default. Points well taken. -- Cheers! Dan Nagle Purple Sage Computing Solutions, Inc.