octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #45263] printf('%X', char(x)) returns x in dec


From: Mike Miller
Subject: [Octave-bug-tracker] [bug #45263] printf('%X', char(x)) returns x in decimal
Date: Sat, 06 Jun 2015 14:38:05 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0 Iceweasel/38.0.1

Update of bug #45263 (project octave):

              Item Group:        Incorrect Result => Matlab Compatibility   
                  Status:                    None => Need Info              
        Operating System:       Microsoft Windows => Any                    
                 Summary: printf with %X is broken => printf('%X', char(x))
returns x in decimal

    _______________________________________________________

Follow-up Comment #3:

There were several fixes to the printf family of functions for 4.0, so it's
entirely possible that some regressions for weird cases like this
unintentionally slipped in as well.

Can someone confirm in Matlab what the output is for


x = 64;
s = sprintf ('%X', x)
s = sprintf ('%X', uint32(x))
s = sprintf ('%X', single(x))
s = sprintf ('%X', char(x))



    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?45263>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]