better printf

Jon Sweedler cjosta at taux01.UUCP
Wed Mar 16 22:07:30 AEST 1988


I am looking for a print formatter with a little more power than
printf.  Believe it or not, I would like something similar to the PRINT
USING statement in BASIC (never thought that I would want C to have a
feature of BASIC!!).  More specifically, I want to be able to print out
a number with different formatting commands (i.e. with spaces or commas
between its digits), and I would also like to be able to print out
binary numbers.  For example:

PRINT USING "## ## ##", a
would print (if a = 823923)
82 39 23
And of course I would also like to be able to control the output radix.
Does anyone know of anything like this that exists?  Thanks in advance.
-- 
Jon Sweedler  ----   National Semiconductor (Israel)
UUCP:  {hplabs,pyramid,sun,decwrl}!nsc!taux01!cjosta
domain: cjosta at taux01.nsc.com
6 Maskit st., P.O.B. 3007,  Herzlia B 46104,  Israel



More information about the Comp.unix.questions mailing list