|
From: | Rik |
Subject: | [Octave-bug-tracker] [bug #46459] Interpreter allows number assignment to "end" key word within array brackets |
Date: | Tue, 17 Nov 2015 17:24:27 +0000 |
User-agent: | Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:42.0) Gecko/20100101 Firefox/42.0 |
Update of bug #46459 (project octave): Status: None => Confirmed Operating System: GNU/Linux => Any _______________________________________________________ Follow-up Comment #1: Confirmed. 'end' is a reserved keyword and it shouldn't be possible to assign to it. This is the case at the command line as shown below. I also used another keyword, 'for' to show that in this case the interpreter is consistent and does not allow the assignment. octave:3> x = [1 2 3]; octave:4> end = 3 parse error: syntax error >>> end = 3 ^ octave:4> for = 5 parse error: syntax error >>> for = 5 ^ octave:4> x(end=2) ans = 2 octave:5> whos Variables in the current scope: Attr Name Size Bytes Class ==== ==== ==== ===== ===== ans 1x1 8 double end 1x1 8 double x 1x3 24 double Total is 5 elements using 40 bytes octave:6> x(for=2) parse error: syntax error >>> x(for=2) _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?46459> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |