home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!ulowell!news.bbn.com!usc!elroy.jpl.nasa.gov!ucla-cs!ucla-se!seas.ucla.edu
- From: linley@seas.ucla.edu (Bruce Linley)
- Newsgroups: comp.lang.c
- Subject: Order of execution...
- Keywords: Umm, Uhh, Well, Daa, Gee
- Message-ID: <7942@lee.SEAS.UCLA.EDU>
- Date: 29 Aug 92 04:17:22 GMT
- Sender: news@SEAS.UCLA.EDU
- Distribution: usa
- Organization: SEASnet, University of California, Los Angeles
- Lines: 18
-
- This subroutine is supposed to convert a string to all lower case:
-
- int StripCase(textLine)
- char textLine[];
- {
- register int index = 0;
-
- while ((textline[index++] = tolower(textLine[index])) != '\0');
- }
-
- The question is will it always work? Or will sometimes work depending on which
- side of the assignment gets evaluated first (up to the compiler)? Is there a
- better way to do this (and still keep it a one liner). Thnaks in advance.
-
- --
- Bruce Linley | Evil code:
- linley@seas.ucla.edu | #define BEGIN {
- Comp Sci & Engr | #define END }
-