Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Re: hmm

From: Eivind Eklund <eivind(at)dimaga.com>
Date: Sat Feb 22 1997 - 16:45:03 EST


[Alex Belits]
>>> with p=""

[Terry Lambert]
>> What?

[Alex Belits]
>but p[strlen(p) - 1] will be p[-1]
>Optimization done by compiler may skip it, but depending on that will be
>rather dangerous.

&& is defined as short-circuiting. If *p == '\0' the evaluation of p[strlen(p) - 1] == '[' is guaranteed to be skipped. Re-read your book on C :)

Eivind Eklund perhaps(at)yes.no http://maybe.yes.no/perhaps/ eivind(at)freebsd.org Received on Sat Feb 22 13:45:16 1997

This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 12:41:02 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library