bugGNU Octave - Bugs: bug #41332, assert should accept more than 3...

 
 

bug #41332: assert should accept more than 3 arguments

Submitter:  Clemens Buchacher <drizzd>
Submitted:  Fri 24 Jan 2014 12:41:32 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Regression
Status:  Fixed Assigned to:  None
Originator Name:  Clemens Buchacher Open/Closed:  * Closed
Release:  * 3.8.0 Operating System:  * Microsoft Windows
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 24 Jan 2014 06:15:50 PM UTC, comment #1: 

Fixed in this changeset (http://hg.savannah.gnu.org/hgweb/octave/rev/7994d3ce6e8e).  This will be a part of the upcoming 3.8.1 bug fix release.

Rik <rik5>
Group administrator
Fri 24 Jan 2014 12:41:32 PM UTC, original submission:  

For the following documented usages, Octave should allow more than 3 arguments:

 -- Function File:  assert (COND, ERRMSG, ...)
 -- Function File:  assert (COND, MSG_ID, ERRMSG, ...)

But in 3.8.0 it does not any more:

function assert (cond, varargin)

  if (nargin == 0 || nargin > 3)
    print_usage ();
  endif


  • Expected output (Octave 3.6.4):


octave:1> assert(false, '%s%s', 'a', 'b')
error: ab
error: called from:
error:   C:\Octave\Octave3.6.4_gcc4.6.2\share\octave\3.6.4\m\testfun\assert.m at line 74, column 9

  • Actual output (Octave 3.8.0):


>> assert(false, '%s%s', 'a', 'b')

error: Invalid call to assert.  Correct usage is:
[...]

Clemens Buchacher <drizzd>

 

(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 rik5 (Posted a comment)
  • -email is unavailable- added by drizzd (Submitted the item)
  •  

    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
    2014-01-24 rik5 StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code