MacArthur, Ian (SELEX GALILEO, UK) schrieb:
> The iostream approach tells you something has happened *if you test the
> badbit* but no signifier appears on the console output, and the stream
> stops outputting until you clear the badbit, so I think that is actually
> less useful in practice than the behaviour exhibited by printf.

It is more general, because streaming is also ment for formatted I/O and 
not only for outprint, like printf. The general concept of streaming 
tells, that a stream is broken, after there happend a problem:

For unix tools it's usual to pipe standard IO, i.e. for filtering. Now 
think of a typed table going throught the filter and a text cell 
vanishs, because the filter lacks an entry and there is not only a text, 
but a typed text, like "0xFFAA" (and ment to be changed by a lookup 
table). At that point you need to break, because all, that follows to 
the problem can produce wrong results. Even when printing to a console, 
I think, it is more useful to stop at point of problem, than to go on, 
because the point of error will not leave console.

> But either way, the OP seems to resolved his problems now, so all is
> well...

Maybe he also likes to know about general concepts behind his current 
problem. I fancy myself to be an experienced C++ user, but it took three 
posts for clearing the whole background of programs behaviour to me...
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to