D. Wood wrote:
I produced the attached document when converting a large DEC Pascal simulation to gpc (under Linux) some years ago. We can still run our code on both VMS and gpc. I think it should help get round most issues you may come across.
It leaves a fair bit of manual editing but by adopting a conversion checklist, the manual process is straightforward.
A little nitpick: in principle GPC should run on VMS. So when you write `Linux REAL defaults to DOUBLE.' it should be `GPC REAL defaults to DOUBLE.' (even on VMS GPC would use DOUBLE as REAL). The same in few other places.
Second remak: GPC supports conditional compilation, macros and include files. Using those features you should be able to avoid extra preprocessing (I assume that DEC Pascal treats {$...} construct as a comment). For example, the following is valid GPC module (assuming that the file "inserter.inc" contains the single word `Insertmarker'):
{$ifndef __GPC__} [INHERIT( gen_lib.pen globals.pen )]MODULE example_mod; {$endif} {$define Insertmarker MODULE example_mod; export example_mod =(task1); PROCEDURE task1(request:integer); END;} {$include "inserter.inc"} PROCEDURE task1(request:integer); BEGIN END; END.