bugGNU Octave - Bugs: bug #39860, Incorrect printf output.

 
 

bug #39860: Incorrect printf output.

Submitted by:  None
Submitted on:  Fri 23 Aug 2013 03:00:54 PM UTC  
 
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: InvalidAssigned to: None
Originator Name: PierreOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 3.6.4
Operating System: Mac OS

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Fri 23 Aug 2013 06:35:31 PM UTC, comment #2:

Check the documentation for printf. It iterates over as many elements as are in the matrix.

Example:

In this case, argv is an empty matrix and size ([]) is [0 0], or a matrix of two elements, which printf properly displays.

Rik <rik5>
Project Administrator
Fri 23 Aug 2013 04:36:44 PM UTC, comment #1:

You might usefully notice the values
of argc.

The output is as expected. No problem.

Michael Godfrey <godfrey>
Project Member
Fri 23 Aug 2013 03:00:54 PM UTC, original submission:

This simple Octave script :

argc = size(argv());
printf('argc : %u\n', argc);

Produces :

argc : 0
argc : 0

(yes twice the expected output)

while if I do a simple printf('Hello World'); it produces the expected output only once.

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 rik5 (Posted a comment)
  • -unavailable- added by godfrey (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
    Fri 23 Aug 2013 06:35:31 PM UTCrik5StatusNone=>Invalid
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1