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

Re: [MacPerl] FNG



Chris Nandor wrote:
> 
> Ronald notes that something called SV_NO provides both values to the
> scalar.  So now it begs the question:  does ~ assume numeric context first
> if there is an integer value available, and if the string value was not the
> last one to be used?  Is this a characteristic of ~, or of perl, which
> returns the numeric value if neither one has ever been used?  If it is a
> characteristic of perl, why does "print $z" treat it as a string?
> 

[No, it doesn't, it *raises* the question.  'Begging the question' is
another name for the fallacy of circular reasoning.  :-P ]


This is a characteristic of all the bitwise operators.  The Camel remarks,
in the explanation of the binary bitwise operators:

  If both operands are strings (and have not been used as numbers since
  being set)...

It doesn't say anything specific about unary ~, but it must work the same
way.


BTW, doesn't print treat everything as a string?


Ronald

***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch