Re: [AD] excustom change + d_edit_proc

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On 2003-06-03, Evert <eglebbk@xxxxxxxxxx> wrote:
> On Tue, Jun 03, 2003 at 02:27:17PM +0200, Elias Pschernig wrote:
> > Sure. Just about the "NULL" - is there really a NULL-pointer as well as 
> > a NULL-character? I always found this confusing, because they are two 
> > different things.. OTOH, str[strlen (str)] = NULL; works, so I guess it 
> > makes sense..
> 
> Both NULL and '\0' are normally just the binary value 0, so you can usually
> interchange them. Not that it's pretty though. It could also (in principle)
> fail on other platforms.

[IIRC]  NULL is _always_ 0, as far as the C language is concerned.  At
the machine level, the null pointer could be something else, but you
don't see that far down.  Check the C FAQ to be certain.  In C++, this
is definitely true, since they recommend bare 0 instead of NULL.

And if '\0' (NUL) isn't always 0, we're all screwed ;-)

-- 
王浩禎




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/