TIP: Click on subject to list as thread! ANSI
echo: cis.languages
to: ALL
from: TONY CAPPELLINI 76370,2104
date: 1990-06-12 01:03:31
subject: #%#..$`## C Compiler

#: 4281 S3/Languages
    12-Jun-90  01:03:31
Sb: #%#**$"## C Compiler
Fm: TONY CAPPELLINI 76370,2104
To: ALL

I know every computer and OS has it's own quirks but can anyone tell me what
strange myths are waiting to jump out at me from this dang C compiler we are
bound to. I'v been doing all my programming on a PC, and when I started to use
the Microware C compiler, boy wuz I in for a surprize. No unsigned chars ? No
formal function prototypes allowed void function(char, int); Ok I guess I can
live with that, but when I try to do a simple input from the keyboard and the
program jumps over the getchar() call like it wasn't even there, that takes the
cake. When I had this problem on the PC, a simple fflush(stdin) would take care
of it. But it aint woikin on dis cawmpyootur ! Y knot ? My code looks like this
printf("\nSelect on e of the following 1,2,3 "); fflush(stdin); ch = getchar();
ch = toupper(ch); switch(ch) { case 'A' : do something break; case 'B' : do
something else break; case 'C' : here too break; } This part works ok. But when
I do the same input and switch statement that is just after this one, the
secondd GETCHAR() doesn't even wait for keyboard input. Where is it going in
such a hurry ? By the way, the printf above should have A, B, C instead of 1,
2,3. My ch variable wuz declared as a char originally, then I tried making it
an int, out of desperation. Any clues to this one ? While your at it, is there
anything else I should no about this compiler before it's tOOOOOOOO late ?? I
know this works on my PC's compiler (sorry about the comparison) so it seems it
must be something in the Microware version. Thanx for da help guys !

TC

There are 4 Replies.

SOURCE: compuserve via textfiles.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.