On 4/11/06, John W. Krahn wrote:
> > This is probably trivial, but I couldn't find a mention of this
> > anywhere - why do the following 2 code lines produce different
> > results?
> >>perl -e 'printf "%d\n" ,0xffff_ffff'
> > -1
> >>perl -e 'print 0xffff_ffff , "\n"'
> > 4294967295
>
> perldoc perlnumber
>

Hi John,
Thanks for the pointer, I guess you wanted me to see the "All the
operators which need an argument in the integer format treat the
argument as in modular arithmetic" sentence.

But why is "print" behaving differently? I.e., why is the 0xffff_ffff
not treated as a number?

Thanks,
--
Offer Kaye

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to