I also got the same results in Octave 3.4.3:
This seems to be a harmless compiler error in the octave, when you use the 'more off' or 'more on' command inside the 1 line if statement, a syntax error is generated.
If you add a new line after the conditional expression, or if you surround the βmoreβ inside eval (...), then it works correctly.
%works correctly, turns off paging screen output if(1) more off; end %works correctly, prints 3.4.3 if(1) disp(OCTAVE_VERSION); end %works correctly, prints '1' if(1) disp([1]); more off; end %syntax error when parsing "off" in 'more off'. if(1) more off; endif %syntax error on parsing 'off' in 'more off;' if 1 more off; endif %works correctly, turns off paging screen output if (1) eval("more off"); endif
Syntax error: "error: parsing error while reading the script file."
source share