Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!yale!cmcl2!adm!smoke!gwyn From: gwyn@smoke.brl.mil (Doug Gwyn) Newsgroups: comp.std.c Subject: Re: Is this a bug in Quick C? Message-ID: <15440@smoke.brl.mil> Date: 11 Mar 91 18:26:39 GMT References: Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 26 In article s64421@zeus.usq.EDU.AU (house ron) writes: >A friend has found that the following program behaves oddly under >Quick C: >main() >{ > int i,j;char c; > i = scanf("%d%c",&j,&c); > printf("%d %d %c\n",i,j,c); >} It's a miracle that it works at all, in the absence of a prototype for the variadic functions scanf() and printf(). should be #included and the main() function should return a value. >The idea is to have the newline typed after the number put into c. >However, Quick C version 2.5 requires that the user type TWO newlines >before any output is produced. Assuming that that behavior persists after you change the program to be strictly conforming to the C standard, it would be an error in the Quick C implementation, rendering it not standard conforming. >It is a question of timing, and most language standards are very lax about >that issue. It is not at all a matter of timing.