Hello Tom,
If ever you consider a port to an another language, I suggest Ada. Ada is issued from Pascal with strong type checking and more. (www.ada2012.org) It is an ISO standard. I port all my Pascal programs to Ada since 2000 and I'm very happy with it. I used P2Ada: http://p2ada.sourceforge.net.
I have some exemples on my web site (in French). Feel free to ask questions if you are interested in.
Regards, Pascal. http://blady.pagesperso-orange.fr
Le 27 janv. 2016 à 22:08, gpc-request@gnu.de a écrit :
Date: Wed, 27 Jan 2016 14:11:59 -0500 From: Schneider schneidt@mail.nih.gov To: samiam@moorecad.com Cc: gpc@gnu.de Subject: Re: GPC compile on Mac OS X 10.10.5? Message-ID: 20160127191159.GA73206@FR-W-C132678.ncifcrf.gov Content-Type: text/plain; charset="us-ascii"
Scott:
What was wrong with getting a p2c translation (just curious). You only have to do the translation once, then you code in C after that.
I'm used to programming in Pascal, not C. Also, it's safer because of the type checking. If I switched I could never go back.
I used p2c (I assume we are talking about the same one). Its a very picky tool that crashes when you look at it funny, but I was able to get satisfactory results.
You are right about looking at it funny! One kind of bug(?) is that it changes how it handles i/o for the input file in the middle of the code. I haven't determined why but fortunately it's a rare problem.
Tom
Thomas D. Schneider, Ph.D. Senior Investigator National Institutes of Health National Cancer Institute Center for Cancer Research Gene Regulation and Chromosome Biology Laboratory Molecular Information Theory Group Frederick, Maryland 21702-1201 schneidt@mail.nih.gov https://schneider.ncifcrf.gov (current link) https://alum.mit.edu/www/toms (permanent link)
Pascal:
I got the translator and compiler working but could not translate and compile a simple pascal program of my own.
verysimple.p - my pascal program verysimple.adb - my pascal program translated to Ada
When I try to gnatmake:
% gnatmake verysimple.adb gcc -c verysimple.adb verysimple.adb:32:01: no candidate interpretations match the actuals: verysimple.adb:32:01: missing argument for parameter "Item" in call to "put" declared at a-tienio.ads:50, instance at line 24 verysimple.adb:32:01: missing argument for parameter "Item" in call to "put" declared at a-tienio.ads:34, instance at line 24 verysimple.adb:32:01: missing argument for parameter "Item" in call to "put" declared at a-tiflio.ads:79, instance at a-lfteio.ads:18 verysimple.adb:32:01: missing argument for parameter "Item" in call to "put" declared at a-tiflio.ads:61, instance at a-lfteio.ads:18 verysimple.adb:32:01: missing argument for parameter "Item" in call to "put" declared at a-tiflio.ads:79, instance at a-flteio.ads:20 verysimple.adb:32:01: missing argument for parameter "Item" in call to "put" declared at a-tiflio.ads:61, instance at a-flteio.ads:20 verysimple.adb:32:01: missing argument for parameter "Item" in call to "put" declared at a-tiinio.ads:76, instance at a-inteio.ads:18 verysimple.adb:32:01: missing argument for parameter "Item" in call to "put" declared at a-tiinio.ads:60, instance at a-inteio.ads:18 verysimple.adb:32:01: missing argument for parameter "Item" in call to "put" declared at a-textio.ads:241 verysimple.adb:32:01: missing argument for parameter "Item" in call to "put" declared at a-textio.ads:207 verysimple.adb:32:05: expected type "Standard.Boolean" verysimple.adb:32:05: found private type "Ada.Text_Io.File_Type" verysimple.adb:32:05: ==> in call to "Put" at a-tienio.ads:40, instance at line 24 verysimple.adb:32:05: ==> in call to "Put" at a-tiflio.ads:68, instance at a-lfteio.ads:18 verysimple.adb:32:05: ==> in call to "Put" at a-tiflio.ads:68, instance at a-flteio.ads:20 verysimple.adb:32:05: ==> in call to "Put" at a-tiinio.ads:66, instance at a-inteio.ads:18 verysimple.adb:32:05: ==> in call to "Put" at a-textio.ads:242 verysimple.adb:32:05: ==> in call to "Put" at a-textio.ads:208 gnatmake: "verysimple.adb" compilation error
Any idea what I'm dong wrong?
Thanks,
Tom
Thomas D. Schneider, Ph.D. Senior Investigator National Institutes of Health National Cancer Institute Center for Cancer Research Gene Regulation and Chromosome Biology Laboratory Molecular Information Theory Group Frederick, Maryland 21702-1201 schneidt@mail.nih.gov https://schneider.ncifcrf.gov (current link) https://alum.mit.edu/www/toms (permanent link)