CompuServe Messages

Help! Can't read char!

    20-Jul-90 02:49:45
Fm: David Art 72017,1130
To: Henry Williams 76416,377
Henry, Just a thought – your example program didn't have an #include <stdio.h> statement. Did you get any linker error messages about undefined pointers? I've got Lattice 5.04, but I tried your example program (without the "ne" section) and it did switch properly. I didn't need the include statment to use a scanf(), but did need the include for using getchar(). Unfortunately, it won't work as you intend when using stdin, since the CON: device buffers characters until you hit return. (i.e. – I had to hit e<return> to get the program to operate. Getting immediate keystrokes requires other techniques which are not the present issue. Hope this helps. 8) David