tech-userlevel archive

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

Re: printf(1) format additions



    Date:        Tue, 24 Jul 2018 13:56:51 -0700
    From:        Alistair Crooks <agc%pkgsrc.org@localhost>
    Message-ID:  <CAN5gJXpKDL1bHqjR6HSwmyhpyTxgm-teF+KrtRB3aMUN0eHZSA%mail.gmail.com@localhost>


  | No objections, I'd love to see these. I have trouble remembering printf
  | field specifiers, and almost always have to resort to a trial and error
  | compile-run-wtf frenzy when I least need it.

Unless you can't recall which chars are possible (which is the less likely
issue) this will probably not help - nothing here will object to using %ld
when you should be using %d (or vice versa) ... the data after all is really
all just strings of digits, there is no intrinsic width for any of it.

It is more useful when you have a few formats, and want to check that the
output from all of them lines up, or similar, so you can adjust field widths,
precisions, etc, to make the output "look right".

kre



Home | Main Index | Thread Index | Old Index