develooper Front page | perl.perl5.porters | Postings from March 2001

Re: [ID 20010305.005] "use integer" doesn't make rand() return integers

Thread Previous | Thread Next
From:
Bryan C . Warnock
Date:
March 7, 2001 16:37
Subject:
Re: [ID 20010305.005] "use integer" doesn't make rand() return integers
Message ID:
01030719391802.05028@homer.idiocity.nut
On Wednesday 07 March 2001 19:34, abigail@foad.org wrote:
> I don't want rand() to do anything in particular. I just don't like to
> see the idea of 'rand() (for some people: that's with *OR* without an
> argument, both cases for the price of one!) flooring to an integer in
> "use integer" context' being ridiculed.
> 

Well, yes, but I think you're telling that to the wrong person.

> Close-mindedness doesn't bring us anything. And rand(10) returning 
integers
> 0 .. 9 makes as much sense as '3.6 + 1.7' equalling 4. Perhaps even more.

Well, yes.  I think that rand(10) should always return the integers from 0 
.. 9, as I mentioned before.


-- 
Bryan C. Warnock
bwarnock@capita.com

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About