[fpc-pascal] Converting old pascal written for Pascal/MT+ compiler
Jacob Kroon
jacob.kroon at gmail.com
Mon Mar 27 11:45:12 CEST 2023
Hi,
I have some old Pascal code that was compiled in a CPM environment using
the Pascal/MT+ compiler from Digital Research. I'm trying to get this
project to build in a modern environment, for a start using FreePascal.
First, is anyone aware of a tool for converting this dialect of Pascal
to something that FreePascal will accept ?
Second, the old code contains a lot of:
var
foobar : external integer;
in sources that reference 'foobar', then there is a declaration in one
of them:
var
foobar : integer;
As I understand it, in order to translate this to something that
FreePascal understands, the variable needs to go in a "unit" and be part
of its interface. Then, pascal sources that needs to reference the
variable should use this unit. Is this the easiest way forward ?
I thought maybe I instead could adapt the syntax like:
var
foobar : integer; external;
but with this I still get undefined references when linking. Using units
seems ok.
Bets regards
Jacob
More information about the fpc-pascal
mailing list