Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!bellcore!faline!ulysses!gatech!hubcap!rchampe From: rchampe@hubcap.UUCP Newsgroups: comp.sys.amiga Subject: Aztec 3.4a 32-bit scanf() bug? Message-ID: <765@hubcap.UUCP> Date: Wed, 25-Nov-87 18:30:30 EST Article-I.D.: hubcap.765 Posted: Wed Nov 25 18:30:30 1987 Date-Received: Sun, 29-Nov-87 07:45:44 EST Organization: Clemson University, Clemson, SC Lines: 33 I'm having trouble reading shorts using scanf when I compile using the +l option. Here's a test program I tried. short i; main() { printf("==> "); scanf("%hd",&i); printf("i: %d\n",i); } First I compiled this using: cc test.c ln test.o -lc and at the prompt, entered 5, it printed: i: 5 However, when I compiled the program using: cc test.c +l ln test.o -lc32 and at the prompt, entered 5, it printed: i: 0 Most of the time when I try to read shorts, I get large negative numbers. Am I doing something wrong, or is there a bug in 3.4a? If it's a bug, is it going to be fixed in 3.6? Rich Champeaux Clemson University