in reply to Re^2: Determining whether a value is zero.
in thread Determining whether a value is zero.
It works as per the OP's spec. Don't blame me for his spec being awful!
For strings,
0+$x; #Upd: Or 1.1 or whatever
is effectively
$x = dualvar(0+$x, $x) if looks_like_number($x);
The OP was clear that dualvar(0, $anything) should be considered zero.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Determining whether a value is zero.
by choroba (Cardinal) on Mar 11, 2011 at 09:34 UTC | |
by JavaFan (Canon) on Mar 11, 2011 at 10:21 UTC | |
by choroba (Cardinal) on Mar 11, 2011 at 10:40 UTC | |
by ikegami (Patriarch) on Mar 11, 2011 at 18:11 UTC | |
by choroba (Cardinal) on Mar 11, 2011 at 22:32 UTC |