octave-maintainers
[Top][All Lists]
Advanced

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

semantics of global variables and exist()


From: John W. Eaton
Subject: semantics of global variables and exist()
Date: Wed, 1 Oct 2003 08:28:55 -0500

On  1-Oct-2003, Teemu Ikonen <address@hidden> wrote:

| It seems that the semantics of declaring a global variable has changed
| subtly between the CVS version and 2.1.50 (Debian packaged).
| 
| With 2.1.50 I get:
| 
| octave:1> global testvar
| octave:2> exist("testvar")
| ans = 0
| 
| With CVS version (last week):
| 
| octave:1> global testvar
| octave:2> exist("testvar")
| ans = 1
| 
| I have scripts which depend on this behaviour, so I'd like to know if this
| is a bug or a feature. 

It is intentional.  For Matlab compatibility, global variables are now
always initialized to an empty matrix.

jwe



reply via email to

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