bugGNU Octave - Bugs: bug #47744, printf family of functions does...

 
 

bug #47744: printf family of functions does not support %b[ouxX] or %t[ouxX] conversions

Submitted by:  Mike Miller <mtmiller>
Submitted on:  Wed 20 Apr 2016 09:26:03 PM UTC  
 
Category: Octave FunctionSeverity: 1 - Wish
Priority: 5 - NormalItem Group: Matlab Compatibility
Status: PostponedAssigned to: None
Originator Name: Open/Closed: Open
Release: devOperating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Wed 20 Apr 2016 09:51:23 PM UTC, comment #2:

And the "%tx" format is especially annoying because it conflicts with POSIX, which treats "t" to mean an integer argument of type ptrdiff_t.

Mike Miller <mtmiller>
Project Administrator
Wed 20 Apr 2016 09:31:40 PM UTC, comment #1:

I see this was briefly discussed in bug #44245 but dismissed, I think it's better to track this separately and leave it for someone to implement if they wish.

I agree these are confusing because they look like integer conversions, but they actually operate on floating point arguments. But this appears to be the only way in Matlab to print the byte values of a floating point value.

Mike Miller <mtmiller>
Project Administrator
Wed 20 Apr 2016 09:26:03 PM UTC, original submission:

For Matlab compatibility, the printf family of functions should support the following conversion specifiers:

I'm not completely sure, but I guess they mean it should interpret the variable's storage location as if it were an integer and display the integer value in the appropriate base.

They give these two examples:

These are the same values that Octave gives for something like

Mike Miller <mtmiller>
Project Administrator

 

(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 mtmiller (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
    Wed 20 Apr 2016 09:36:51 PM UTCmtmillerSeverity3 - Normal=>1 - Wish
      StatusNone=>Postponed

    Back to the top


    Powered by Savane 3.1-cleanup1