getch() and getche() in MSC 4.0

Doug Gwyn gwyn at smoke.BRL.MIL
Fri Oct 28 05:55:25 AEST 1988


In article <1737 at cbnews.ATT.COM> lvc at cbnews.ATT.COM (Lawrence V. Cipriani) writes:
>A related suggestion...  I have a program that makes '_' an alphabetic
>by changing _ctype[].  This was a bad idea ...

Yeah, I've seen a couple of instances of that.  Usually I fix it by
simply finding where the macro is used and adding the additional test
for '_' there.  I've never seen a significant loss of speed thereby.

The general principle is to avoid relying on any details of the
specific implementation(s).  If something is not guaranteed by the
spec, it is subject to change even on the same system but certainly
across systems.



More information about the Comp.lang.c mailing list