Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!amdcad!ames!ucbcad!ucbvax!venus.ycc.yale.EDU!leichter From: leichter@venus.ycc.yale.EDU ("Jerry Leichter") Newsgroups: comp.os.vms Subject: re: VAX C V2.3, VMS V4.6 Message-ID: <8711012020.AA13211@ucbvax.Berkeley.EDU> Date: Thu, 29-Oct-87 11:34:00 EST Article-I.D.: ucbvax.8711012020.AA13211 Posted: Thu Oct 29 11:34:00 1987 Date-Received: Thu, 5-Nov-87 20:54:58 EST Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: "Jerry Leichter" Organization: The ARPA Internet Lines: 40 The on-line release notes of VAX C V2.3 say: o The printf and scanf functions now perform formatted output and input respectively with the addition of three new format flags (#, +, space) and the following new format specifiers: i, p, and n. Who can tell what the new specifiers are supposed to do? I did not find them in the VAX C V2.3 RTL manual, or in online HELP. These specifiers are from the ANSI Draft Standard; apparently the documenters of VAX C didn't quite manage to keep up with the implementors. Here - in summary - is what Harbison and Steele list for these flags and specifiers: + Always produce a sign, either plus or minus SPACE Produce either a minus sign or a space # Use a variant of the main conversion operation; depends on the conversion operation. Applies to eEfgGoxX only. #o - insert leading 0 #x,X - insert leading 0x or 0X #f,e,E - always include ".", even if trailing #g,G - as above plus some sort of 0-stripping i Same as d on output. On input, reads a generic C integer constant (e.g., allows a leading 0x). Does NOT accept a size marker (e.g., trailing L) in the INPUT, only in the format string. p Prints a generic pointer (a (void *)) in an implementation- specific format. Reads said format back on input. n Argument must be an (int *), which receives as a value the number of bytes output (or read) so far. Produces no output and doesn't increment the value returned by xscanf. -- Jerry ------