From bug-request at octave dot org Fri Feb 4 20:45:45 2005 Subject: Re: Should be able to say 'for (k=1:N)' From: Paul Kienzle To: octave bug mailing list Date: Fri, 4 Feb 2005 21:50:23 -0500 On Feb 4, 2005, at 12:07 PM, John W. Eaton wrote: > On 4-Feb-2005, Paul Kienzle wrote: > > | This is not a parser inconsistency. > | > | "for k = ..." is special syntax in the language. > | > | The consistent thing is to consider (k=1:3) to be a value. > > Yes, this is all correct. However, Matlab does seem to allow > > for VAR = VAL ... end > > and > > for ( VAR = VAL ) ... end > > > I'm in favor of keeping the change for compatibility, but am open to > other suggestions. As usual, compatibility trumps consistency. - Paul ------------------------------------------------------------- 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 -------------------------------------------------------------