[Top][All Lists]

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

PSPP-BUG: [bug #62251] Strings containing „%.*s” cannot be reordered

From: Ben Pfaff
Subject: PSPP-BUG: [bug #62251] Strings containing „%.*s” cannot be reordered
Date: Mon, 4 Apr 2022 11:28:06 -0400 (EDT)

Update of bug #62251 (project pspp):

                  Status:                    None => Invalid                
             Open/Closed:                    Open => Closed                 


Follow-up Comment #1:

When the conversion string has a "*", each "*" needs to have a numbered
position as well.  The manpage for printf explains it this way:

       The overall syntax of a conversion specification is:

           %[$][flags][width][.precision][length modifier]conversion

       The arguments must correspond properly (after type promotion) with the
       sion specifier.  By default, the arguments are used in the order given,
       each  '*'  (see Field width and Precision below) and each conversion
       asks for the next argument (and it is an error if  insufficiently  many
       ments are given).  One can also specify explicitly which argument is
taken, at
       each place where an argument is required, by writing "%m$" instead of
'%'  and
       "*m$"  instead of '*', where the decimal integer m denotes the position
in the
       argument list of the desired argument, indexed starting from 1.  Thus,

           printf("%*d", width, num);


           printf("%2$*1$d", width, num);


Reply to this item at:


  Message sent via Savannah

reply via email to

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