bugGNU Octave - Bugs: bug #36818, same line if + more

 
 

bug #36818: same line if + more

Submitter:  None
Submitted:  Mon 09 Jul 2012 06:26:43 PM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Invalid / Not an Octave Bug Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 3.6.2
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 09 Jul 2012 07:47:18 PM UTC, comment #1: 

1. You could probably do away with the  ~=0 part. Anything unequal to 0 would be considered true

2. If you add a semicolon or comma after the if statement proper, the error is gone as well, like:
if (exist ('OCTAVE_VERSION')); more off; end

Contrary to the answer in your link to stackoverflow.com, I think this is not a buglet associated with the more function, but just sloppy syntax (sorry).
FYI, Matlab often complains in a similar fashion about that syntax (if ML could be considered an authorative comparison at all, of course)

Philip Nienhuis <philipnienhuis>
Group Member
Mon 09 Jul 2012 06:26:43 PM UTC, original submission:  

I get a syntax error for the following line in octave 3.6.2:


if(exist('OCTAVE_VERSION')~=0) more off; end


while:


if(exist('OCTAVE_VERSION')~=0)
 more off;
end


seems ok. Yet:


if(exist('OCTAVE_VERSION')~=0) fflush(stdout); end


works nicely.

Is this a bug(?) related to non the parenthesized argument of more?

See:

http://stackoverflow.com/questions/11383614/octave-same-line-if-more

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by philipnienhuis (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-07-09 philipnienhuis StatusNone Invalid / Not an Octave Bug
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code