CompuServe Messages

#C problems

    07-Mar-91 20:35:12
Sb: #8164-#C problems
Fm: Robert Hayes 70431,1737
To: Greg Comeau@Comeau Cmptg 72331,3421
It sounds like you agree somewhat. But I did find out the enter key is the newline character. That *is* the second response he is referring to. Also, looking at his program, it is plain he only wants the _first_ char typed in. Either way, the computer is not a smart machine, just fast. He must find a way to deal with newline since he is dealing with a buffered input. Either go to a char string input, or do the dreaded unbuffered input routine (fear of the unknown, there). Of course, "there should be a call to fflush() between input and output calls. The call ensures that any input or output collected in intermediary buffers is sent on…….." This is a direct quote from my C manual. I do use this on the DOS machines at work, but I'm not doing anything dealing with console currently on the Amiga. For me, it usually winds up being easier to just use a char string. I'm not looking for eloquence, I'm looking for sturdiness and the easy way to do things (as long as it doesn't resemble spaghetti). We both agree, and I've born it out by a small program, the second time his program responds it is due to the newline character as you mentioned in your first message. I've never been able to read from the unbuffered console, of course I haven't really _tried_ to either. BTW, IMHO, the char string is best (for me), I need to check inputs some of the time and manipulate the string itself. Robert 8)