Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!caen!ox.com!math.fu-berlin.de!fauern!unido!ira.uka.de!smurf!flatlin!spirits!rob From: rob@spirits.ka.sub.org (Roland Bless) Newsgroups: comp.sys.amiga.programmer Subject: SAS C5.10a BUG? Message-ID: Date: 12 Apr 91 14:13:14 GMT Organization: Byteable Software Products, private, Karlsruhe (FRG) Lines: 55 Hi! I've trouble with SAS C 5.10a. Consider the following program: ------------------------- cut here ------------------------- #include #include void main(void); int n; double db; void main(void) { printf("Gimme a double:"); scanf("%lf",&db); printf("Gimme a number:"); scanf("%d",&n); printf("got: %d\n",n); } ------------------------- cut here ------------------------- When compiling with: lc -w -fi test and linking with BLINK LIB:c.o,test.o LIB LIB:lcmieee.lib LIB:lcs.lib The program will read the first value, but it won't wait at the second scanf, it returns 0 in n instead!! ---- Gimme a double:42 Gimme a number:got: 0 ---- What's this? BTW: The problem doesn't show up, if compiled as follows: lc -fi test BLINK LIB:c.o,test.o LIB LIB:lcmieee.lib LIB:lc.lib or lc -w test BLINK LIB:c.o,test.o LIB LIB:lcms.lib LIB:lcs.lib Or is it my fault? Seems to be the same with lcm881.lib... Any suggestions? (Yes, I want to use 16-bit ints and IEEE for some reasons) Roland -- R o l a n d B l e s s |UUCP/USENET: rob@spirits.ka.sub.org | Kriegsstrasse 129 |BITNET: UKG5@DKAUNI2.BITNET FAX: +49211623818 | 7500 Karlsruhe - FRG |---------spirits--in--the--material--world---------| voice +49 721 857328 |"They built machines that they can't control" STING|