What's wrong ?

S

santosh

CBFalconer said:
Why shouldn't the OS have a provision: I won't display the output
unless the program completes successfully?

Perhaps, but since OP's code returns an undefined termination status, we
cannot know for sure what that status was. It could have returned
whatever is the code for "successful completion", or it might not have.
The Standard doesn't say anything, as far as I'm aware, about the
further behaviour of a program which returns an undefined termination
status value. That is left up to the host. It's also the stated intent
of the standard that unbuffered and line buffered output appear as soon
as possible and that all data be written to files. Thus I would say
that it's most unlikely for the OP's code to produce any unexpected
behaviour outside of a clc-designed DS9000.
 
R

Richard Heathfield

CBFalconer said:
Why shouldn't the OS have a provision: I won't display the output
unless the program completes successfully?

Think about it. If your OS behaved like that, you'd be typing blind. Even
if the OS provided input echo (which it might argue "doesn't really count
as output"), you'd still be stuffed, because the program would block for
input without ever once displaying a prompt. Even with a "prompts
cribsheet", at some point an average user is bound to make a few mistakes
that the program can detect. Noticing your own mistakes (without being
told about them) and keeping track of your retries in your head so that
you can keep your place on the cribsheet is going to be extremely tedious
and error-prone. And then, when you finally got sick of it and managed to
work out how to quit the program without any prompts, you'd get an
enormous list of all the prompts you should have had during the program
run...

It ain't ever gonna sell.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top