Trouble with curses

Doug Gwyn gwyn at smoke.brl.mil
Fri Nov 9 18:05:10 AEST 1990


In article <1990Nov7.194154.6071 at ssd.kodak.com> weimer at ssd.kodak.com (Gary Weimer) writes:
-ANSI complient definition of tolower() does call islower() before
-making the conversion. In this case, the code "expands" to:
-    switch(islower(getch()) ? tolower(getch()) : (getch())) {
-Note that you are now always making two calls to getch() (as someone
-has already pointed out is a possibility).

While an implementation may evaluate the argument twice, it is definitely
not conformant to the ANSI C standard if it does.



More information about the Comp.lang.c mailing list