Re: Function in C
Posted: Fri Mar 13, 2009 5:06 am
The advantages of floating point addresses, you could check to see if it's a NaN
Ehm... actually, no.Combuster wrote:that's why you should compare to NULL instead of comparing to 0. On machines without MMU you'll see often enough that RAM starts at 0 and the program is in ROM somewhere else. And then your code must still be able to work.
Yep, I believe in C, NULL is defined asSolar wrote:Ehm... actually, no.Combuster wrote:that's why you should compare to NULL instead of comparing to 0. On machines without MMU you'll see often enough that RAM starts at 0 and the program is in ROM somewhere else. And then your code must still be able to work.
The definition of a null pointer constant is "an integer constant expression with the value 0, or such an expression cast to type void *".
Code: Select all
#define NULL ((void *) 0) //or something equivalent.
Code: Select all
#define NULL 0