You're missing a ! in the second if.
/ Martin Nilsson (Åskblod)
Previous text:
2003-01-22 16:14: Subject: Re: zero_type() & UNDEFINED and _typeof()
Without this, any test like:
if (map[key]) ...;
would behave incorrectly when map[key] is present but is integer 0.
This is EXACTLY what zero_type is there to solve. I.e use:
if(zero_type(map[key])) { key not present in map } else if(map[key]) { key present but value is zero } else { key present with a non-zero value }
/ David Hedbor