Semantics of Equals (was: Re: Question about checks for min and max values)

Fairlight fairlite at fairlite.com
Mon Jul 25 13:53:11 PDT 2005


Y'all catch dis heeyah?  Kenneth Brody been jivin' 'bout like:
> #include <stdio.h>
> 
> int main(int argc, char *argv[])
>     {
>     char string1[] = "This is a string";
>     char string2[] = "This is a string";
> 
>     if ( string1 == string2 )
>         printf("They are equal.\n");
>     else
>         printf("They are not equal.\n");
> 
>     return(0);
>     }

Maybe the smiley is the key, but that only works because they're exactly
identical--assuming it works.  One should be using strcasecmp() for strings.

mark->
-- 
          *****   Fairlight Consulting's Software Solutions   *****
OneGate Universal CGI Gateway:                  http://onegate.fairlite.com/
FairPay PayPal Integration Kit:                 http://fairpay.fairlite.com/
RawQuery B2B HTTP[S] Client & CGI Debugger:     http://rawquery.fairlite.com/
Lightmail Mail Sending Agent:                   http://lightmail.fairlite.com/
FairView Image Viewer for Integration:          http://fairview.fairlite.com/


More information about the Filepro-list mailing list