bugGNU Octave - Bugs: bug #31692, 'error' function behaves different...

 
 

bug #31692: 'error' function behaves different from MATLAB, causing program to stop

Submitted by:  None
Submitted on:  Thu 18 Nov 2010 10:44:38 AM UTC  
 
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Feature Request
Status: FixedAssigned to: None
Originator Name: DanielOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 3.2.2
Operating System: Microsoft Windows

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sat 20 Nov 2010 12:45:06 AM UTC, comment #3:

The report that prompted this change back in September of 2009 was not reported on the bug tracker. I don't know whether it was even reported on a public mailing list. I can't seem to find a message about it in the archives either.

John W. Eaton <jwe>
Project Administrator
Fri 19 Nov 2010 09:48:05 AM UTC, comment #2:

Thanks, very nice.

But why doesn't that show up when I search for e.g. "error empty" here:

http://savannah.gnu.org/bugs/?func=search&group=octave

I also tried to Nabble the old mailing lists, but didn't find this fix...

Sorry for the double post
and thanks again.

Anonymous
Thu 18 Nov 2010 07:19:31 PM UTC, comment #1:

This incompatibility has already been eliminated:

http://hg.savannah.gnu.org/hgweb/octave/rev/ef45d191d833

John W. Eaton <jwe>
Project Administrator
Thu 18 Nov 2010 10:44:38 AM UTC, original submission:

According to the MATLAB documentation, the function 'error' will not interfere with the program if called with an empty argument:

http://www.mathworks.com/help/techdoc/ref/error.html

"...empty...no effect...no action is taken..."

This allows constructions like

instead of

where nargchk() produces a string "too many", "too few" or an empty string if the number of input arguments is valid.

Would it be possible to have Octave's error() function behave in the same way, i.e. ignoring empty arguments?

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jwe (Posted a comment)
  • -unavailable- added by None (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 18 Nov 2010 07:19:31 PM UTCjweStatusNone=>Fixed
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1