On Sat, 15 Oct 2011 09:24:36 +0200 "Ludo Brands" <ludo.bra...@free.fr> wrote
>On Fri, 14 Oct 2011 20:01:47 -0300 <andrew.benn...@ns.sympatico.ca> >wrote >> 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 Oops! Silly me. But some kind of complaint from the compiler would have been helpful! Andrew Bennett _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal