From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f7344,b4a033983c1b721b X-Google-Attributes: gidf7344,public X-Google-Thread: 10f8a1,b4a033983c1b721b X-Google-Attributes: gid10f8a1,public X-Google-Thread: 1164f8,b4a033983c1b721b X-Google-Attributes: gid1164f8,public X-Google-Thread: 114f7d,b4a033983c1b721b X-Google-Attributes: gid114f7d,public X-Google-Thread: 135e0a,b4a033983c1b721b X-Google-Attributes: gid135e0a,public X-Google-Thread: 1014db,b4a033983c1b721b X-Google-Attributes: gid1014db,public X-Google-Thread: f6134,b4a033983c1b721b X-Google-Attributes: gidf6134,public From: rmoore@qualcomm.com (Ryan Moore) Subject: Re: scanf problem on Vax C vs Dec C Date: 1997/12/19 Message-ID: <67ectu$761$1@thefuture.qualcomm.com>#1/1 X-Deja-AN: 308629175 References: Content-Type: Text/Plain; charset=US-ASCII Organization: Qualcomm, Inc. Mime-Version: 1.0 Newsgroups: cern.vaxusers,comp.lang.c,comp.org.decus,comp.os.vms,comp.sys.dec,vmsnet.alpha,vmsnet.infosystems.misc In article , rcyoung@groupz.net says... > >I have code using Vax C on VMS that uses scanf. It appears to function >properly, waiting for a 'new line' character to be entered. Recompiled on >Dec C on an Alpha VMS system, scanf does not appear to wait for the new line >character. VMS is 6.1 in both cases with corresponding compatible (ie old) >compilers.. > >Any ideas? I am at a loss.......... Yeah, I had a similar experience with VAX C and DEC C acting differently on scanf("%c", &blah). I don't remember why it acted differently.... it may have to do with scanf("%c"...) picking up a newline from a previous scanf() statement. I ended up changing my scanf("%c") stuff to scanf("%s") stuff and using the first character in the resulting string. -Ryan