JP> printf("Enter length: ");
JP> scanf("%d", &len);
JP> printf("Enter width: ");
JP> scanf("%d", &width);
JP> I am simply stunned to find ICC acting in such an erroneous way with
JP> something so trivial.
I have seen a number of responses to this agreeing that ICC is
not very good for doing this. On the contrary, it is a
perfectly good thing to do, and has highlighted a *BUG* in *YOUR*
program, where you have assumed that stdout is unbuffered. This
is not the case, it is line buffered. If you wish it to be
unbuffered, you should call setvbuf and specify _IONBUF or
whatever. It's well defined in ISO/IEC 9899:1990 terms. You can
FREQ the ANSI draft from me, which is essentially identical to the
ISO standard. It's called ANSI_C.*. FREQ from 3:711/934. The
last word in any argument. BFN. Paul.
@EOT:
---
* Origin: This is just another kludge line like SEENBY (3:711/934.9)
|