octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Nested functions patch


From: Max Brister
Subject: Re: Nested functions patch
Date: Sat, 10 Mar 2012 13:58:20 -0700

I forgot to reply to the first part of your email:

| I think it is reasonable to issue an error if a new symbol is created
| when there are child functions.  A related question is what should
| happen if we have
|
|  eval ("global x")
|
| or
|
|  eval ("persistent x")
|
| ?  It seems to me that those could also cause trouble.

matlab handles eval ("global x") by making x global in all scopes
which have access to x. This should be easy to support.

matlab complains on the eval ("persistent x") claiming that "???
Error: The PERSISTENT declaration must precede any use of the variable
x.", which is sort of odd. We should be able to emit a better error
message than that.

Max Brister


reply via email to

[Prev in Thread] Current Thread [Next in Thread]