Xref: utzoo comp.sources.d:1879 comp.unix.questions:6090 Path: utzoo!mnetor!uunet!husc6!cmcl2!nrl-cmf!ames!amdahl!nsc!taux01!cjosta From: cjosta@taux01.UUCP (Jon Sweedler) Newsgroups: comp.sources.d,comp.unix.questions Subject: better printf Message-ID: <505@taux01.UUCP> Date: 16 Mar 88 12:07:30 GMT Reply-To: cjosta@taux01.UUCP (Jon Sweedler) Organization: National Semiconductor (Israel) Ltd. Lines: 18 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@taux01.nsc.com 6 Maskit st., P.O.B. 3007, Herzlia B 46104, Israel