Hi Adriaan,
I've try many times to port GPC to MAC OS X / Darwin without the succes I wished, before I fall in Ada language, more strict but more functionnal.
Nevertheless I've modified 'gpcpp.c' the preprocessor source code in order to accept Mac Pascal directives.
If you or any one want it let me know I will put it on my web site.
Best , Pascal Pignard. http://perso.wanadoo.fr/blady Best
Frank Heckenbach wrote:
I.e., we might choose to implement them for compatibility's sake. Then again, how far is GPC compatible to CW in other respects? Is it reasonable to claim (or strive for) compatibility at all?
Well, I don't mind writing different code, where compilers and platforms are different. I am striving for the possibility to do so within one conditionalized source code. One might call this the lowest level of compatibility, the possibilty to write a conditional compiler expression IFxx ELSExx ENDxx in a way that both compilers understand.
In CodeWarrior Pascal, you have the choice between "Apple style" and "BP style" conditional expressions (the latter not strictly BP, but enhanced with Apple-like features) You can use either, but you can't mix them in the same project, e.g.
{$ifc condition} ... {$elsec} ... {$endc}
or either
{$if condition} ... {$else} ... {$endif}
in all sources.
Most Macintosh programmers traditionally will use "Apple style" conditional expressions, since they are used in Apple's Pascal Interfaces to MacOS. I, for one, am lucky to maintain my own Pascal Interfaces to MacOS, so for me the choice is free. Also, I am free to make any changes to those Interfaces, needed for GPC.
To put it in a nutshell, I will be very grateful if GPC supports
{$if condition} ... {$else} ... {$endif}
and it would be nice if
{$ifc condition} ... {$elsec} ... {$endc}
is supported also. The other items from the CodeWarrior Reference are non-essential.
Best regards,
Adriaan van Os