OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Subject: Re: C versus other languages, round 538 or so (Re: CGI scriptsinsh)
From: Peter Pentchev (roamORBITEL.BG)
Date: Mon Oct 02 2000 - 09:49:40 CDT


On Mon, Oct 02, 2000 at 02:03:25AM +0200, Bluefish (P.Magnusson) wrote:
> Looking at James' comments in the fixup;
> // (sizeof(variable)-1) instead of sizeof(variable) - NULL, \0, 0
>
> It's beyond me what he's actually wants to spell out.
> sizeof(variable) - NULL == sizeof(variable) - 0
> sizeof(variable) - sizeof(NULL) == sizeof(variable) - 4 (if NULL 32bit)

I think he meant "Using (sizeof(variable)-1) instead of sizeof(variable)
because we have to account for the last character/byte being NULL (or \0,
or 0, or whatever you want to call it)"... or something like that :)

G'luck,
Peter

--
If I had finished this sentence,