Re: strange getch+kbg- behaviour



"simnav" <nospamtnx> said:

Richard Heathfield wrote:

+AD4- jacob navia said:
+AD4- +AD4- getch() probably expects an ASCII character, not just some
+AD4- +AD4- keyboard key
+AD4-
+AD4- That incorrect answer is a great example of why you should ask
+AD4- platform-specific questions on a newsgroup devoted to the
appropriate
+AD4- platform.

Please accept my apologies for the two mistakes I did: incorrect
newsgroup and multi post (my newsreader is driven crazy and sent it too
many times...)
Anyway Jacob response was wrong in ANSI context but seems to be correct
on dos/djgpp platform:

Not even correct in /that/ context, because Delorie followed Borland's lead
with getch, and Navia's response was incompatible with Borland C's
behaviour and therefore incompatible with DJGPP's behaviour. You'd be
better off finding out how to use DJGPP's getch in a DOS programmers'
newsgroup.

getkey() resolved the problem.

....but didn't teach you why getch() didn't behave as you expected. You might
want to chase that down, in the interests of understanding what on earth is
going on.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
.



Relevant Pages

  • Re: Measuring time differences
    ... Such a solution is off-topic in this newsgroup, ... > with his platform. ... solve the poster's problem or that it could be incorrect. ...
    (comp.lang.c)
  • Re: strange getch+kbg- behaviour
    ... +AD4- jacob navia said: ... +AD4- platform-specific questions on a newsgroup devoted to the ... Please accept my apologies for the two mistakes I did: incorrect ... on dos/djgpp platform: getkeyresolved the problem. ...
    (comp.lang.c)
  • Re: SQL Server -vs- MySQL
    ... I don't really know how to respond to you b/c ... most of what you said is patently incorrect. ... AdoNet problems from this newsgroup.>> ... your comment does exactly what you accuse me of. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: SQL Server -vs- MySQL
    ... I don't really know how to respond to you b/c ... most of what you said is patently incorrect. ... AdoNet problems from this newsgroup.>> ... your comment does exactly what you accuse me of. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Wondering about comp.lang.c
    ... > that can be reasonably ported to any platform. ... > reducing newsgroup static the only important goal). ... > wonder where a novice C programmer, on any platform, should go to get ... darrell at cs dot toronto dot edu ...
    (comp.lang.c)