From bug-request at octave dot org Sat Jan 7 00:18:01 2006 Subject: Possible Parsing Bug From: Bill Denney To: bugs at octave dot org Date: Sat, 7 Jan 2006 01:16:52 -0500 (EST) I was just typing some code in 2.1.72 on cygwin when I did something that I was surprised about. The following code worked correctly (i.e. it returned a 6) when I thought that it should have failed parsing, and similar code fails in matlab 7SP2. The code is octave:1> localtime(time).year-100 ans = 6 The reason that I thought that this may be a bug is because I'm evaluating a field in a structure returned from a function. Normally, I would have expected to have to set it to a variable. Similar things work for arrays: octave:1> funtion a = testa(x);a = 1:x;endfunction octave:2> testa(5)(3) ans = 3 I just wanted to check if this was a bug or a feature. Bill -- "I used to think that the brain was the most wonderful organ in my body. Then I realized who was telling me this." -- Emo Phillips ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------