> When the routine being passed as a parameter is in the top > level of the unit, "PrPublic", all is well; the expected pointers are > passed. When an identical routine "PrPrivate" is hidden inside > the top level routine "Test_it", the expected 2nd pointer appears > in place of the first and an apparently random pointer appears > second. > > What am I doing wrong? >
You can't assign private functions to procedural types. http://www.freepascal.org/docs-html/ref/refse17.html says "A global procedure or function address". The delphi 6 help is even more explicit: "Nested procedures and functions (routines declared within other routines) cannot be used as procedural values." Ludo _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal