compare strings, strcmp

George A. Basar aic at mentor.cc.purdue.edu
Fri Nov 17 08:38:11 AEST 1989


In article <5205 at mentor.cc.purdue.edu>, aic at mentor.cc.purdue.edu I write:
>   It is not unsafe, it is just that he was looking for a a way to not
> perform the strcmp if the first chars were unequal.  He stated it was
> unsafe(performance-wise) since the order of evaluation is suspect. So the

  I blew it, apologies to all. No excuse given.  This is not unsafe for the
application specified, though, which was a fixed array of strings(aasuming
a calling convention of StrEq(a[i],b[i])).  There are many ways to optimize
a solution to a specific problem that would fail in other cases.
  Once again, sorry.
  Revoke my cc rights and make me use fortran :-).


* George A. Basar                              (317)742-8799 (home)
* aic at mentor.cc.purdue.edu                     BASAR at PURCCVM.BITNET    
| General Consultant                   	       (317)494-1787 (work)
| Purdue University Computing Center

Discalimer: My opinions are just that, mine.



More information about the Comp.lang.c mailing list