getch() and getche() in MSC 4.0

Doug Gwyn gwyn at smoke.BRL.MIL
Thu Oct 27 08:06:33 AEST 1988


In article <236 at shockeye.UUCP> hermit at shockeye.UUCP (Mark Buda) writes:
>How many systems have it which way? (I know. It is unwise to depend on
>"toupper" in portable programs...)

All C implementations should provide toupper() via <ctype.h>.
Whether it is implemented as a macro or a function is the only
significant variable.  Some macro implementations are "unsafe"
(with respect to side-effects in their arguments), so for
maximum portability you should not rely on toupper() being
"safe" even though ANSI C will require that.

Don't use _toupper(), which may not even exist in many implementations.



More information about the Comp.lang.c mailing list