Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!samsung!munnari.oz.au!uhccux!tholen From: tholen@uhccux.uhcc.Hawaii.Edu (David Tholen) Newsgroups: comp.lang.fortran Subject: Re: {upper|lower}case (Re: intrinsic) Message-ID: <10713@uhccux.uhcc.Hawaii.Edu> Date: 19 Dec 90 10:03:20 GMT Distribution: comp Organization: University of Hawaii Lines: 18 > If you did have an intrinsic to do case conversion, you could count on it not > being part of the ANSI/ISO Fortran77 standard - because lowercase letters > are not part of the standard character set! (Of course, if you were > using C, you could use tolower(), but let's not start up THAT war again...) Although it is true that only the 26 uppercase letters are in the so-called FORTRAN character set, it is also true that comment lines "may contain any character capable of representation in the processor in columns 2 through 72", and that character strings (constants and variables) "may consist of any characters capable of representation in the processor". Thus it is perfectly standard to have an intrinsic function that operates on strings that contain lowercase letters, assuming that lowercase letters can be represented by the processor. In fact, the LEN intrinsic function can operate on strings containing lowercase letters, so there is no reason why an uppercasing or lowercasing function could not be part of the ANSI standard. I've written both uppercasing and lowercasing functions for my own library, so I don't need to resort to C's tolower; it's easily accomplished in standard conforming FORTRAN, though an intrinsic should be faster.