[fpc-pascal] using functions from units & main programme

Alberto Narduzzi albertonarduzzi at yahoo.com
Fri Nov 18 20:52:10 CET 2011


> Thanks for the fix, but it makes the code a bit more complicated than
> I'd hoped/thought based on my (over simple?) impression that local fns
> are used in place of those in units. John

this would be true if you declared another function fnb locally, so that 
calling fnb could eventually override the one in the unit.
As said, the unit itself doesn't (and cannot, btw) know anything about 
the program (or other units, for instance) that are using it.

Cheers, A.



More information about the fpc-pascal mailing list