|
0 registered members (),
1,089
guests, and 10
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: 0 == NULL?
[Re: Spirit]
#228463
09/19/08 18:08
09/19/08 18:08
|
Joined: Aug 2003
Posts: 7,439 Red Dwarf
Michael_Schwarz
Senior Expert
|
Senior Expert
Joined: Aug 2003
Posts: 7,439
Red Dwarf
|
0 is the integer zero, indicating a variable, integer, double (...)
Imagine 0 as the byte "00000000"
NULL is a pointer to a zero memory address that contains... well, Nothing. NULL is neither "0" nor has *any* value.
"Sometimes JCL reminds me of Notch, but more competent" ~ Kiyaku
|
|
|
Re: 0 == NULL?
[Re: Spirit]
#228465
09/19/08 18:14
09/19/08 18:14
|
Joined: Aug 2003
Posts: 7,439 Red Dwarf
Michael_Schwarz
Senior Expert
|
Senior Expert
Joined: Aug 2003
Posts: 7,439
Red Dwarf
|
it may be in C-Script, but in many other languages the comparison
if(0 == NULL) { echo "The same"; }
will never be true.
"Sometimes JCL reminds me of Notch, but more competent" ~ Kiyaku
|
|
|
Re: 0 == NULL?
[Re: TWO]
#228486
09/19/08 21:35
09/19/08 21:35
|
Joined: Aug 2003
Posts: 7,439 Red Dwarf
Michael_Schwarz
Senior Expert
|
Senior Expert
Joined: Aug 2003
Posts: 7,439
Red Dwarf
|
c#
0 == null > false
php
0 === null > false
"Sometimes JCL reminds me of Notch, but more competent" ~ Kiyaku
|
|
|
|
|
|