[fpc-pascal] Converting old pascal written for Pascal/MT+ compiler

Tomas Hajny XHajT03 at hajny.biz
Tue Mar 28 12:14:03 CEST 2023


On 2023-03-28 11:33, Karoly Balogh via fpc-pascal wrote:


Hi,

  .
  .
> You might wanna consider this approach, because if units somehow end up
> cross-referencing each other, then you might run into difficulties
> restructuring the code to use Units. Also, it is possible to
> cross-reference units from eachother, but there are some caveats.
> 
> With the external way, you only need to change the declarations of
> variables, no need to restructure the code, although for long-term
> maintenance, that might be still beneficial.

Since some changes would be necessary anyway even if using imports (not 
only adding public names plus changing the external references, also 
some changes necessary to get multiple object files linked into the same 
final program), I'd suggest biting the bullet and changing the code to 
units, but yes, an alternative exists.

Tomas


More information about the fpc-pascal mailing list