On Wednesday, May 18, 2016 11:40 PM, Brandon Allbery wrote:
On Wed, May 18, 2016 at 11:29 AM, Brandon Allbery > wrote:
On Wed, May 18, 2016 at 11:27 AM, mt1957 > wrote:
This has
Hi Richard,
This has something to do with lazy evaluation. It triggers the
calculation when it wants to show the value in $r. So commenting out the
first 'say' will error on the second with the shown response. The CATCH
is not at the same scope than the second 'say' statement so there you
Marcel and Moritz,
Thank you for the fast response.
I have been experimenting with the code you sent, but still do not
understand something. To illustrate, here is another snippet:
use v6;
my $r;
for 0..4 -> $s {
{
$r = 5 / (3 - $s);
say "At line $?LINE r is $r";
CATCH {