..something that can't be automatically quoted on my newsreader
other people manage. perhaps your news reader is broken.
since
you used the wrong "Reply" link on Google(TM) Groups, despite being told
DOZENS of times by a newsgroup regular EXACTLY how to do it...
I've missed these posts. I rememeber being told once (perhaps by you)
but when I asked for more information I didn't get any. Perhaps if
you explained my error I could mend my ways.
I'll snip most of your contentless ranting.
Outside of the very specific question that I posed to initiate
this thread, I have no need of ANY "help" in writing or re-writing
the function, since I wrote it years ago and have used it probably
like a million times since then in production code.
strange I thought you asked a question at the beginning.
In fact if your code was perfected years ago why are you asking
questions about float and double?
As part (and probably genesis) of these information communication
problems, you need to be able to make clear-cut practical logical
distinctions. You consistently conflated input that DELIBERATELY
was missing certain fields with "poorly-structured input",
perhaps I used a poor term. Would you prefer "weakly" structured.
erm "not rigidly structured"? Flexible structured?
no
matter how many times it was explained to you, and how many
examples you were shown.
I only saw one post that had examples.
You also conflate *scanf() as
"requiring structured input" when no such thing is actually
true; the way *scanf() is written it will "accept" very badly-structured
input and "silently" give you bad values for your arguments while
apparently succeeding, or not scan PERFECTLY structured
input with PERFECTLY valid scannable fields.
I disagree. If scanf() is properly used it will read the
fields you specify. I agree it doesn't do what you want
but that isn't scanf()s "fault". Note all caps is like
shouting. It makes it look like you're cross or something.
This is because like so much bad code, *scanf() was written
according to requirements based first and foremost on the sloth
of the programmer who wrote it,
I disagree. scanf() can be a bit arcane. But it does a useful
job. perhaps if you'd read scanf()s documentation you would't
be reinventing wheels and trying to stuff floats into doubles.
the very self-same type of
programmer that would look at a clearly-stated set of requirements
and exclaim
obviously your idea of a clear requirment differs from mine.
If it's an input stream I like BNF or solid examples. Your
vague scanf()-like format specs didn't cut the mustard.
There are two ways a requirement can fail to be communicated.
The receiver is stupid or the message is ambiguous or
poorly structured.
There is NO way I can use *scanf() in any rational fashion
to acheive the requirements I stated.
ok. I just wondered if you could smash the input string
up into tokens then use scanf() on the tokens. Just a
thought.
About the only way to
do so would be to ridiculously and wastefully call *scanf()
to convert and assign a single field after I had done all the
"heavy lifting" of writing the whole argument field-scanning
variadic loop, but *scanf() essentially just calls strto*()
functions at that point, SO WHY DON'T I JUST CALL
THEM MYSELF AND ELIMINATE THE POINTLESS
MIDDLEMAN?!??!!
ok... so you aren't too keen on that idea...
As far as using "using *scanf() to
parse the field", GET SERIOUS, I hope nobody is so
deranged to conflate *scanf() with any type of tokenizer
or regular expression parser; it is an artless ram-shackle
piece of junk that relies almost totally on it's conversion
functions to define a "scannable" field, and can only be
TRULY safely used to scan an input string that you KNOW
to be perfectly formatted in every way
ooo! isn't that strongly structured input?
(it CANNOT be SAFELY
used to determine the actual FORMAT of the string, since
it only scans as best as it can (badly), it doesn't PARSE).
normally I'd plonk you at this point but you make me smile!
--
Nick Keighley
If cosmology reveals anything about God, it is that He has
an inordinate fondness for empty space and non-baryonic dark
matter.