bugGNU Octave - Bugs: bug #49152, printf output incompatible with...

 
 

bug #49152: printf output incompatible with MATLAB

Submitter:  None
Submitted:  Wed 21 Sep 2016 07:34:26 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Matlab Compatibility
Status:  Wont Fix Assigned to:  None
Originator Name:  Andy Potvin Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 4.0.3
Operating System:  * Microsoft Windows Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 21 Sep 2016 07:42:49 PM UTC, comment #1: 

Matlab does not have a printf function, or at least one that is documented and advertised on their public-facing docs.

Octave's printf function is compatible with the C library function and is exactly the same as Matlab's fprintf when called with no file argument.

For Matlab compatibility you should stick to the documented functions fprintf and sprintf.

If there really is a Matlab printf function, please provide a link to documentation or a description of which versions of Matlab it is provided by and how it works. Closing as won't fix for now, but can be reopened if this really does need to be done for compatibility.

Mike Miller <mtmiller>
Group Member
Wed 21 Sep 2016 07:34:26 PM UTC, original submission:  

Notice the difference between MATLAB and Octave output printf.
Octave should do what MATLAB does.

It IS ok to contact me about this bug report or for any other
related question.
Andy Potvin
-email is unavailable-
(626) 226-8436


Octave 4.0.3
=-=-=-=-=-=-=

>> printf('fubar')

fubar>>


MATLAB 2012a
=-=-=-=-=-=-=

>> printf('fubar')

fubar
ans =
     5



>> ver

----------------------------------------------------------------------
GNU Octave Version: 4.0.3
GNU Octave License: GNU General Public License
Operating System: MINGW32_NT-6.1 Windows 7 Service Pack 1 i686
----------------------------------------------------------------------
Package Name         | Version | Installation directory
---------------------+---------+-----------------------
<unimportant>





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 mtmiller (Posted a comment)
  • -email is unavailable- added by None (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
    2016-09-21 mtmiller StatusNone Wont Fix
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code