Mail Archives: djgpp/2004/09/02/18:12:03
> > But: the use of the code above would be to collect arguments passed to
> > the command line _except_ yours have no variable to collect!
> >
> > Since you have put in the body of your main, is no longer a prototype!
>
> You apparently don't understand C++ enough.
Thank you for my defence. It's hard for me (without a brand name in
this mailing list) to defend against acm.org member ending each
sentence with an exclamation mark. :)
Anyway, reading this again and again (libc.inf/scanf)--
Return Value
------------
The number of items successfully matched and assigned. If input ends,
or if there is any input failure before the first item is converted and
assigned, `EOF' is returned.
-- I'm becoming more and more confident, that it's actually
inconsistent with the current implementation.
To return EOF, the input has to end *before* the first item
converted/assigned, because when it has to end otherwise? It has to
end sometime... No word about conversion items pending.
Egon
- Raw text -