TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: John Poltorak
from: Paul Edwards
date: 1995-04-02 01:12:48
subject: scanf

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)

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.