Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!aplcen!haven!adm!smoke!gwyn From: gwyn@smoke.brl.mil (Doug Gwyn) Newsgroups: comp.lang.c Subject: Re: Trouble with curses Message-ID: <14400@smoke.brl.mil> Date: 9 Nov 90 07:05:10 GMT References: <1990Oct27> <20900012@inmet> <1990Nov7.194154.6071@ssd.kodak.com> Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 9 In article <1990Nov7.194154.6071@ssd.kodak.com> weimer@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.