in reply to Tutorial::What is true and false?
At the very least please include undef as a false value not just 0 and ''.
I mentioned this a while back in the CB, as a *tweak*. A quick glance at the node might lead you into thinking undef isn't false, but if you read the node, it explicitly mentions that undef is false. So only the lazy will get caught.
Pedantic semantics: undef is not a value, it's the condition of lacking a value; so it is, in fact, true that the only false values are 0 and ''. I know it seems needlessly nitpicky, but it behooves us as programmers to keep 'boney was a warrior" , 7.178, and -18 in a conceptual box distinct from the one where we keep undef. Don't be fooled by the fact that there are operators that do stuff with undef into thinking it's a value like all the others.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(tye)Re: Tutorial::What is true and false?
by tye (Sage) on May 28, 2001 at 21:55 UTC |