[Top][All Lists]

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

[Octave-bug-tracker] [bug #36658] syntax change for initialization of gl

From: Rik
Subject: [Octave-bug-tracker] [bug #36658] syntax change for initialization of global/persistent variables
Date: Tue, 03 Jul 2012 00:36:11 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:13.0) Gecko/20100101 Firefox/13.0.1

Follow-up Comment #15, bug #36658 (project octave):

I've made a patch based on jwe's suggestion which implements a new syntax
(':=') for variable initialization.  Try it out and see what you think.

Other changes:
1) I added a new Octave warning ID (Octave:initialization_syntax) so that the
warning about using the old syntax can be suppressed.  The warning is on by

2) I updated NEWS with the new behavior and put in a sunset clause of 3.12 for
the current initialization syntax.

3) The Texinfo documentation has been updated.  It now seems clearer to me
what is intended by initialization.

4) All of the scripts in the Octave source tree have been updated to use the
new syntax.

Incidentally, I kept the current syntax for assigning the default value of
variables in function headers.  This seemed clearer to me since A) it is
reminiscent of existing programming languages like C++ and B) it squares with
my mental model of the variable being "assigned" a value which is then
overriden if the user supplies something different.  We could change to use
the same ':=' syntax if we want, but it does generate a lot of warnings

(file #26140)

Additional Item Attachment:

File name: init_syntax.patch              Size:38 KB


Reply to this item at:


  Message sent via/by Savannah

reply via email to

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