On 23 Nov 2013, at 17:29, Andrew Brunner wrote:

> Ok, I had a test program that used a few other units.  Apparently this had to 
> be placed at the top of my units that used and implemented the nested 
> callback type.
> 
> {$mode objfpc}
> {$modeswitch nestedprocvars}

If you turn on warnings, you'll see that the compiler tells you that global 
switches must appear before any statements.

> The last question I have is when can I expect to use nested procedure 
> variables system wide without compiler directives?  What's the hold-up or 
> reason why the mode is even needed?

They are only enabled by default in macpas mode and ISO because traditional 
Macintosh Pascal and ISO Pascal compilers are the only ones that supported them 
by default (albeit not via the "is nested" syntax). They'll probably never be 
enabled by default in any other mode. The reason is simply that there is no 
need to do so.


Jonas_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to