Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!snorkelwacker!paperboy!meissner From: meissner@osf.org (Michael Meissner) Newsgroups: comp.lang.c Subject: Re: _tolower and _toupper macros Message-ID: Date: 28 Jul 90 04:07:55 GMT References: <2891@dftsrv.gsfc.nasa.gov> <1990Jul26.100721.14628@warwick.ac.uk> <246@audfax.audiofax.com> Sender: news@OSF.ORG Organization: Open Software Foundation Lines: 19 In-reply-to: arnold@audiofax.com's message of 27 Jul 90 14:01:59 GMT In article <246@audfax.audiofax.com> arnold@audiofax.com (Arnold Robbins) writes: | I guess tolower() and toupper() remain real functions in V.3.2 in case | anyone takes their address; I can't see any other reason to not have them | be macros identical to their _to* counterparts. No, I think it's more that the normal way to implement a real toupper or tolower as macros evalulates the argument 2 times (one for the test, and once for either side of the ?:). I seem to remember coming on some real live System V code that breaks if the argument is evaluated more than once. Of course with internationalization these days, the way to implement tolower/toupper is through a 257 element array. Using the array also only evaluates the argument once if implemented as a macro. -- Michael Meissner email: meissner@osf.org phone: 617-621-8861 Open Software Foundation, 11 Cambridge Center, Cambridge, MA Do apple growers tell their kids money doesn't grow on bushes?