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,c3d0e99376a4f379 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Date: Fri, 17 Aug 2007 16:35:38 +0200 From: Gautier User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Interested about number crunching in Ada References: <1187235764.909133.180650@19g2000hsx.googlegroups.com> <_Mdxi.26970$Mu5.17602@newsfe15.phx> <1187344327.459317.18070@q4g2000prc.googlegroups.com> In-Reply-To: <1187344327.459317.18070@q4g2000prc.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 83.77.159.11 X-Original-NNTP-Posting-Host: 83.77.159.11 Message-ID: <46c5b20d$1_4@news.bluewin.ch> X-Trace: news.bluewin.ch 1187361293 83.77.159.11 (17 Aug 2007 16:34:53 +0200) Organization: Bluewin AG Complaints-To: abuse@bluewin.ch X-Original-NNTP-Posting-Host: 127.0.0.1 Path: g2news2.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wns13feed!worldnet.att.net!164.128.36.58!news.ip-plus.net!newsfeed.ip-plus.net!news.bluewin.ch!not-for-mail Xref: g2news2.google.com comp.lang.ada:1476 Date: 2007-08-17T16:35:38+02:00 List-Id: Jerry: > Anyway, the Pascal-to-Ada converter p2ada is said to have successfully > converted the entire Numerical Recipes into Ada. That's right, and the "formal" translation itself is pretty easy, there is indeed even a batch file that does the job automatically. After comes the manual rework 8-{... I just updated the file newp2ada.txt in newp2ada.zip by adding a walk-through that was missing (after downloading nrpas13.zip, cf. http://www.google.com/search?q=nrpas13.zip ): To translate the Numerical Recipes in Pascal, you need to: - unzip nrpas13.zip somewhere - copy newp2ada\goodies\tr_nrec.bat at the same place - run tr_nrec.bat - everything is translated in the Ada subdirectory; one .adb file per driver/demo, one .adb file with all recipes - you need manual rework to make the recipes compile, e.g., numerical conversions are explicit in Ada (the compiler will tell you where you need to add explicit conversions); making a well-modularised, consistent set of packages of the whole recipes, with unconstrained array types instead of the dozen of fixed-size Pascal array types, Ada's complex numbers and other nice features would be an interesting goal but a long work... ______________________________________________________________ Gautier -- http://www.mysunrise.ch/users/gdm/index.htm Ada programming -- http://www.mysunrise.ch/users/gdm/gsoft.htm NB: For a direct answer, e-mail address on the Web site!