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 _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal