[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] find value in array



On Wed, Oct 18, 2000 at 01:38:12PM -0700, Linc Madison wrote:
> At 8:33 PM +0200 10/18/2000, Bart Lateur wrote:
> >OTOH, it's not the only string for which this is the case: other zero
> >valued strings are True as well: "0E0", "0.000", ".0", "0.", "-0". All
> >zero, all true. So this exception was actualy unnecessary.
> 
> Actually, the exception WAS necessary.

He means, the exception was not necessary because Perl's builtin-in
functions could have returned '0E0' instead of '0 but true'.  Both convert
to 0, both are true in a boolean context, but '0E0' is numeric and '0 but
true' isn't.

If Perl's built-ins had been written to return '0E0' instead, then there
would not have been an exception for '0 but true'.

Ronald

# ===== Want to unsubscribe from this list?
# ===== Send mail with body "unsubscribe" to macperl-request@macperl.org