From: CSBVAX::MRGATE!@KL.SRI.Com:leichter@venus.ycc.yale.edu@SMTP 31-OCT-1987 08:25 To: EVERHART Subj: re: VAX C V2.3, VMS V4.6 Received: from venus.ycc.yale.edu by KL.SRI.COM with TCP; Thu 29 Oct 87 08:35:24-PST Date: 29 Oct 87 11:34:00 EST From: "Jerry Leichter" Subject: re: VAX C V2.3, VMS V4.6 To: "info-vax" Reply-To: "Jerry Leichter" 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 ------