|
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 (roam
ORBITEL.BG)Date: Mon Oct 02 2000 - 09:49:40 CDT
- Next message: Imran Ghory: "Pegasus Mail"
- Previous message: Dag-Erling Smorgrav: "Re: C versus other languages, round 538 or so (Re: CGI scriptsinsh)"
- In reply to: Bluefish (P.Magnusson): "Re: C versus other languages, round 538 or so (Re: CGI scriptsinsh)"
- Next in thread: Aigars Grins: "Re: C versus other languages, round 538 or so (Re: CGI scriptsinsh)"
- Reply: Peter Pentchev: "Re: C versus other languages, round 538 or so (Re: CGI scriptsinsh)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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,
- Next message: Imran Ghory: "Pegasus Mail"
- Previous message: Dag-Erling Smorgrav: "Re: C versus other languages, round 538 or so (Re: CGI scriptsinsh)"
- In reply to: Bluefish (P.Magnusson): "Re: C versus other languages, round 538 or so (Re: CGI scriptsinsh)"
- Next in thread: Aigars Grins: "Re: C versus other languages, round 538 or so (Re: CGI scriptsinsh)"
- Reply: Peter Pentchev: "Re: C versus other languages, round 538 or so (Re: CGI scriptsinsh)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]