Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!linus!decvax!microsoft!uw-beaver!tektronix!ogcvax!omsvax!hplabs!sri-unix!lwa@mit-csr From: lwa%mit-csr@sri-unix.UUCP Newsgroups: net.unix-wizards Subject: Re: need info: %r in printf Message-ID: <12667@sri-arpa.UUCP> Date: Sat, 15-Oct-83 11:48:00 EDT Article-I.D.: sri-arpa.12667 Posted: Sat Oct 15 11:48:00 1983 Date-Received: Sat, 22-Oct-83 02:42:30 EDT Lines: 12 The %r format item is "recursive format". It causes the next argument in the argument list (which should be a string) to be interpreted as a format string; the remainder of the arguments in the argument list are printed according to the new format string. Note that this isn't really "recursive" in that the format strings aren't nested; when the end of the new format string is reached the printf terminates. Fortunately, this means it's pretty easy to simulate %r: just concatenate (strcat) the original format string and the "recursive" string and use the result as the format string to printf. -Larry Allen -------