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

John Lee johnelee0 at gmail.com
Fri Nov 18 16:49:44 CET 2011


I have a normal fpc unit, call it jim, with 2 functions fna & fnb . fnb
uses internally fna.

My main program, has a uses clause including jim, and also a _different_
version of fna, with same parameters as for that in jim, but no fnb.

The problem I get is that when, in main program fnb doesn't use the _new_
version in the main program of fna but still uses the version that is in
the unit. I'd thought that versions of fns in the main program are used in
place of those in the unit when they both have the same name, but maybe not
when a function is used another function?

Never seen this before - is there a way I can force fnb to use the main
program's version of fna, not the version that's in the unit?

TIA John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20111118/a9fa4ac1/attachment.html>


More information about the fpc-pascal mailing list