Parse error when defining a cell array
Bill Denney
bill at denney.ws
Sat Dec 6 10:50:52 CST 2008
Jan Albersmeyer wrote:
> Description:
> -----------
>
> It seems that the call to the "eye" function is not handled correctly
> while defining a cell array.
>
>
> Repeat-By:
> ---------
>
> This is how I would expect Octave to work, and in this case it does fine.
>
> octave:1> e = { 0, eye(5) }
>
> Here, a whitespace is inserted between eye and its argument, leading to
> irritating results:
>
> octave:2> e = { 0, eye (5) }
>
Hi Jan,
This is actually expected behavior (sorry for the irritation). The
reason is that since Octave allows spaces or commas to separate
matrix/cell arguments, it is impossible to tell when you mean
0, eye() (5)
as opposed to
0, eye(5)
within [] or {}.
Have a good day,
Bill
More information about the Bug-octave
mailing list