more on long long scanf and printf

David Hough uunet!Eng.Sun.COM!dgh
Wed May 30 11:07:59 PDT 1990


James Gosling points out an ambiguity about %ll :
> 
> > > "%ll" is not possible without introducing a
> > > syntactic ambiguity: it can't be distinguished from "%l" followed by
> > > "l"
> 
> > Correct, but isn't this true of %lf already?
> 
> %lf works because "l" is a "format modifier", not a "conversion
> character".  Every % specification has exactly one conversion character
> that comes at the end.  The conversion characters are diouxXgGeEsc%
> The current format modifiers are 0123456789.+-l#
> 
> "%lld" would fit into the current scheme. "%ld" is already an accepted
> format specifier for "long".

I think h and L are also format modifiers, and f is a conversion character.
Anyway, the point is that because of this ambiguity about l, %L[ioux]
might be more standardizable than %ll[ioux] in the next X3J11 round.
Any X3J11 members want to comment?



More information about the Numeric-interest mailing list