comma position in conjuction with \ problem
Sergei Steshenko
sergstesh at yahoo.com
Mon Nov 10 12:48:25 CST 2008
Hello All,
please see the following session:
"
GNU Octave, version 3.0.3
Copyright (C) 2008 John W. Eaton and others.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTIBILITY or
FITNESS FOR A PARTICULAR PURPOSE. For details, type `warranty'.
Octave was configured for "i686-pc-linux-gnu".
Additional information about Octave is available at http://www.octave.org.
Please contribute if you find this software useful.
For more information, visit http://www.octave.org/help-wanted.html
Report bugs to <bug at octave.org> (but first, please read
http://www.octave.org/bugs.html to learn how to write a helpful report).
For information about changes from previous versions, type `news'.
octave:1> system("pwd; cat -n comma_position_bug.m");
/home/sergei/junk
1 foo = \
2 {\
3 "a", \
4 "b"
5 };
6
7 bar = \
8 {\
9 "a" \
10 ,"b"
11 };
octave:2> source("/home/sergei/junk/comma_position_bug.m")
parse error near line 10 of file /home/sergei/junk/comma_position_bug.m
syntax error
>>> ,"b"
^
error: near line 10 of file `/home/sergei/junk/comma_position_bug.m'
error: source: error sourcing file `/home/sergei/junk/comma_position_bug.m'
"
- I believe 'octave' should not report syntax error because '\' is just a
line continuation character in this case, so effectively 'octave' should in
both cases perceive RHS as
{"a","b"}
.
Thanks,
Sergei.
More information about the Bug-octave
mailing list