Thomas,
Yes, I would not mind a decent Mac OS compiler as well. I used to think I would move all of my work to MacOS, generally being a better OS that the others, but these days I am to heavily involved with Linux to do that. In any case, I have all three types of machines (and then some) here at my house, Windows, Linux and Mac, so its just a matter of what I need at the moment. In any case, I have sympathy for your position.
FPC certainly qualifies as a cross platform OS, and I believe it runs well on MacOS?? I have never tried it. In the past it was always a big deal to convert the source, but nowadays, with the ISO 7185 mode, that should be a lot less work. It really depends on FPC. I know with some other compilers, the ISO 7185 switch enabled standard mode, but locked you into "ISO 7185 jail", ie, made it inconvienent or impossible to use their extensions unless you drop the option, in which case most of your source would not compile, etc. Perhaps someone with FPC experience could weigh in here.
Believe me I have been there myself. I used to keep a file called "basicio.pas" where I kept all of the nonstandard procedures used to access OS functions like open and close files, etc. Then I would have one of those per compiler installation/vendor. Because a lot of Pascal compiler makers had a string type that was incompatible with pascal string types (which is in fact "packed array [1..xxx] of char") the open file function often translated the Pascal string to whatever the string type was on the particular implementation (point of fact there are things like that in Pascal-P6 to allow GPC calls).
Your association with P2C interests me. I used that to translate Pascal libraries for Petit-Ami (another one of my projects). The tool is awful. It crashes if you give it any sources that are even slightly wrong, and the (original) author takes pains to mention in the documentation that he knows quite well about this and does not, in fact, care. I wonder if you had improved that situation?
"I write scripts that call compilers with the parameters needed to compile my programs. If the name of the compiler changes then the scripts break."
Well, ok, but note that the name for my project is Pascal-P5, has been so for 10 years, and will always be named that. Pascal-P6 is a whole 'nuther beast entirely. At my development rate (glacial) I don't think anyone is going to need to rewrite their scripts a lot.
Regards,
Scott Franco
--------- Original Message --------- Subject: Re: Plan to Update GPC From: "Schneider, Thomas (NIH/NCI) [E]" schneidt@mail.nih.gov Date: 8/13/20 8:28 am To: "scott andrew franco" samiam@moorecad.com, "gpc@gnu.de" gpc@gnu.de
Scott:
I'm just looking for Pascal compilers that run on macOS. My programs follow the original compilers in which the files listed at the top of the program are directly read and written to by the Pascal program. GPC used to do this. P2C (which I maintain apparently) translates to C and then provides this. I don't know what ISO that corresponds to.
For your second point, I assume you are talking about the Pascal-P1-P6 thing? (not sure I understand your point about "name change breaks the code")
I write scripts that call compilers with the parameters needed to compile my programs. If the name of the compiler changes then the scripts break. For example, if the Unix 'ls' command were named ls763 and then a new version were named ls764 lots of code would break.
Can Pascal-P be used on the Mac? Well, actually yes. Pascal-P6 includes sufficient tooling to port without GPC (see the interpreter written in C). I don't really push that capability because P6 is still in development, and also because interpreters are not really my thing (yes, I know that sounds funny). I like compilers. To me interpreters are more of a fun toy than not, although I note that there is a group pushing interpreters as "VM"s for professional use. Pascal-P5 has actually been written up as such. Again, not bad, just not my thing.
Ok, maybe when P6 is stablized and GPC independent it can be used to compile on macOS.
I should mention there is a branch from P5 known as P5c that that changed the compiler into a Pascal to C translator that accomplishes porting in a different way. You would have to look into that yourself, I'm not really up to speed on that.
That's interesting, thanks.
https://sourceforge.net/projects/pascal-p5c/
Tom
Thomas D. Schneider, Ph.D. Senior Investigator National Institutes of Health National Cancer Institute Center for Cancer Research RNA Biology Laboratory Biological Information Theory Group Frederick, Maryland 21702-1201 schneidt@mail.nih.gov https://alum.mit.edu/www/toms