Path: utzoo!utgpu!news-server.csri.toronto.edu!dgp.toronto.edu!wuethri Newsgroups: comp.sys.amiga.programmer From: wuethri@dgp.toronto.edu (Charles Wuethrich) Subject: SAS C getchar() and putchar() Message-ID: <1991Apr3.212140.20292@jarvis.csri.toronto.edu> Organization: CSRI, University of Toronto Date: 4 Apr 91 02:21:40 GMT Lines: 32 Hello Netland, I have a preoblem while executing the K&R C Program below after having compiled it with Lattice C 5.10A (lc -Lm progname): #include main() { int c; c = getchar(); while (c != EOF) { putchar(c); c = getchar(); } } I cannot debug the program as cpr goes wild (I have a 2500/20 with 1.3) at the first getchar() call (actually it kind of dies with no gurus), and if I execute it, it does not reprint the character as it should. I recall that some time ago there was a discussion on SAS C I/O functions. But, of course, I was not interested in it at the time. The same program on a Sun 3/60 works flawlessly. What is wrong? Any help would be appreciated Charles -- * Charles Wuethrich, Dynamics Graphics Project, U. of Toronto * * wuethri@dgp.toronto.edu *