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,dd17afdec1033c93 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!z9g2000hsf.googlegroups.com!not-for-mail From: j.khaldi@oltrelinux.com Newsgroups: comp.lang.ada Subject: Re: From Pascal to Ada Date: Sat, 03 Nov 2007 06:29:03 -0700 Organization: http://groups.google.com Message-ID: <1194096543.239692.101110@z9g2000hsf.googlegroups.com> References: <1193957079.981952.101030@d55g2000hsg.googlegroups.com> <877il1cz9h.fsf@ludovic-brenta.org> NNTP-Posting-Host: 80.67.112.156 Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Trace: posting.google.com 1194096543 20592 127.0.0.1 (3 Nov 2007 13:29:03 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sat, 3 Nov 2007 13:29:03 +0000 (UTC) In-Reply-To: <877il1cz9h.fsf@ludovic-brenta.org> User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1.9) Gecko/20071025 Firefox/2.0.0.9,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: z9g2000hsf.googlegroups.com; posting-host=80.67.112.156; posting-account=ps2QrAMAAAA6_jCuRt2JEIpn5Otqf_w0 Xref: g2news2.google.com comp.lang.ada:2707 Date: 2007-11-03T06:29:03-07:00 List-Id: On Nov 2, 12:38 am, Ludovic Brenta wrote: > j.kha...@oltrelinux.com writes: > > Hi, > > how do you translate this Pascal code in Ada? > > > type > > realFunction = function(x: double): double; > > generic > with function Func (X : Long_Float) return Long_Float; > procedure Apply (To : in out Vector); > Well, I am porting a math library from Object Pascal (Delphi and Free Pascal) to Ada. The original library was written in C and I translated it to Object Pascal many years ago. As other C libraries it uses a lot of pointer to functions and the translation between C and Object pascal code was a straitful word to word. The library has a lot of functions, very fast and I am using it for a long time in many projects without arising a single bug. Lastly I am very interested in Ada and as first "serious" exercice, I am trying a fast "mechanical" translation, almost word to word, from Object Pascal to Ada of this library. Jilani