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

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

[Octave-bug-tracker] [bug #63829] Padding string with 0 in fprintf resul


From: Thibaud Pigeon
Subject: [Octave-bug-tracker] [bug #63829] Padding string with 0 in fprintf results in padding with spaces
Date: Wed, 22 Feb 2023 08:06:57 -0500 (EST)

URL:
  <https://savannah.gnu.org/bugs/?63829>

                 Summary: Padding string with 0 in fprintf results in padding
with spaces
                   Group: GNU Octave
               Submitter: thibaudp
               Submitted: mer. 22 févr. 2023 13:06:55
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
                 Release: 7.3.0
         Discussion Lock: Any
        Operating System: Microsoft Windows
           Fixed Release: None
         Planned Release: None


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: mer. 22 févr. 2023 13:06:55   By: Thibaud Pigeon <thibaudp>

fprintf('%08s', dec2bin(42));


expected output: '00101010'
actual output:   '  101010'

Matlab R2020b and codeblocks-20.03mingw behave as expected.







    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?63829>

_______________________________________________
Message posté via Savannah
https://savannah.gnu.org/




reply via email to

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