Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!husc6!rutgers!sunybcs!cald80!bob From: bob@cald80.UUCP (bob) Newsgroups: comp.lang.c Subject: Re: output formatting in C Message-ID: <1227@cald80.UUCP> Date: Mon, 20-Jul-87 22:24:35 EDT Article-I.D.: cald80.1227 Posted: Mon Jul 20 22:24:35 1987 Date-Received: Wed, 22-Jul-87 03:18:07 EDT References: <1085@gilsys.UUCP> Reply-To: bob@cald80.UUCP (bob) Organization: Calspan Advanced Technology Center Lines: 27 Keywords: print using, column alignment [ EAT BITS, LINE-EATER!! ] In article <1085@gilsys.UUCP> mc68020@gilsys.UUCP (Thomas J Keller) writes: > > A friend of mine is writing a program which will, among other things, >output some columnar data. He wishes to have the columns alingned so that >the decimal points of each number are aligned. OK, this is silly but I'll bite (or is that byte?). This simply accomplished with the '[f]printf' statement thusly: printf("%8.3f\n", fnum); or fprintf(fd, "%8.3f\n", fnum); which is the rough equivalent of: PRINT USING ####.###, FNUM This may be oversimplified for the case that you are using but I don't have any further details to go on. --- Thinking quickly, the IBM System Jock # Bob Meyer uttered an incantation in EBCDIC and made # Calspan Advanced Tech. Center the sign of the Terminated Fork. # seismo!kitty!sunybcs!cald80!bob The UNIX Guru only smiled and trapped # decvax!sunybcs!cald80!bob him in a recursive SED script.