On 05/26/2018 09:09 PM, Brad Gilbert wrote:
On Sat, May 26, 2018 at 10:59 PM, ToddAndMargo <toddandma...@zoho.com> wrote:
On 05/26/2018 05:10 AM, Brian Duggan wrote:
To convert to an positive integer, use truncate:
$ p6 'say 1000.rand.truncate;'
876
or use pick:
perl6 -e 'say (^1000).pick'
209
Brian
Hi Brian,
What does
(^1000)
mean?
`^1000` is short for `0..^1000` which is syntax for
`Range.new( 0, 1000, :excludes-max )`
Almost got it.
Why the caret in `0..^1000`? Why not `0..1000`?
Why do I sometime see a range written `0..1000`
and `0...1000` (three dots)?
Does
`Range.new( 0, 1000, :excludes-max )`
mean any number between 1 and 1000, excluding 1000?
Is there an `:excludes-min`?
Thank you for the help!
-T