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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,74d953d10520ed5e X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-05-29 11:56:43 PST Message-ID: <3ED657D4.36ABC3A9@somewhere.nil> Date: Thu, 29 May 2003 20:56:20 +0200 From: Gautier Write-only X-Mailer: Mozilla 4.8 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: using charles library References: <3ED2EB15.7B74D21E@somewhere.nil> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 80.218.95.41 X-Trace: news.swissonline.ch 1054234602 80.218.95.41 (29 May 2003 20:56:42 +0200) X-Complaints-To: abuse@swissonline.ch Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!feed.news.nacamar.de!uio.no!newsfeed.kolumbus.fi!newsfeed2.funet.fi!newsfeed3.funet.fi!newsfeeds.funet.fi!seven.news.surf.net!irazu.switch.ch!switch.ch!news-zh.switch.ch!news.swissonline.ch!not-for-mail Xref: archiver1.google.com comp.lang.ada:38011 Date: 2003-05-29T20:56:20+02:00 List-Id: > > Did you consider a translation of the Pascal code too (it could > > facilitate maintenance and performance, and lift the language > > interfacing issues) ? Roman V. Isaev: > The main question is not the translation itself which is possible. > It may pose problems too as these 3000+ lines of "pascal" contain mostly this: > > IF KK=2 THEN GOTO 179; > GOTO 178; > 179: YRR:=YR21; > YZR:=ABS((1.0+Y2)/Y12-2.0*XY*(XY-Z)-4.0/3.0* > (Y1+Y2)/Y12*Z+(2.0*XY-Z)*(2.0*XY-Z)*(2.0*XY-Z)/3.0*Z*Y1/(1.0+Y)); > IF YZR>1.E-18 THEN GOTO 190; > YZR:=1.E-18; > 190: YR21:=TAU0*DG*FG/ETA/Q-8.0*Z/YZR; Ouch! Are you sure you don't want to know the math behind ?... - Just kidding. > > In that case the tool on the link below may help you... > > Gautier -- http://www.mysunrise.ch/users/gdm/gsoft.htm#p2ada > > This tool breaks on lines like this: [ things with 2.* or 1.e-5 ] I'll try something. Normally a little change to Pascal.l should do the trick. Normally... > there are no useful 1.e constants like 1.e-18 and 1.E6 in ada Sure there are: 1.0e-18, 1.0E6 :-) > Writeln(FFF,'text',QY1:1:5,'text') turns into something like that: > > Put(FFF); > Put( -- [P2Ada]: !Help! Maybe (file,...) here > "text text text "); > Put( -- [P2Ada]: !Help! Maybe (file,...) here > QY1,5,1,0); > Put( -- [P2Ada]: !Help! Maybe (file,...) here > " text text text"); New_Line; -- [P2Ada]: !Help! Maybe (file) Okay: if you make P2Ada "see" the definition of FFF (a file I suppose), e.g. by using the Import/Export features of P2Ada, you'll have Put(FFF,"text text text"); Put(FFF,QY1,5,1,0); Put(FFF,"text text text"); New_Line(FFF); ...at least I hope so - I've left some bugs for the pleasure of it. ________________________________________________________ Gautier -- http://www.mysunrise.ch/users/gdm/gsoft.htm NB: For a direct answer, e-mail address on the Web site!