On Tue Jan 20 09:25:16 2009, moritz wrote:
> On Sat Jan 17 14:44:21 2009, szab...@gmail.com wrote:
> > for (my $i = 1; $i <= 3; $i++) { say $i; }
> > 
> > prints 2 instead of giving an intelligent error message that one
> > should use loop
> > or better yet for 1..3 -> $i {  }
> 
> Since the for-loop is legal syntax, you should try to bug Larry to make
> STD.pm emit a warning, then implementations will follow; since it's not
> yet specced, I'll stall this ticket.
> 
> Cheers,
> Moritz

This appears to be resolved:

21:10 < coke> std: for (my $i = 1; $i <= 3; $i++) { say $i; }
21:10 <+p6eval> std 30000: OUTPUT<<===SORRY!===NLUnsupported use of C-style 
                "for (;;)" loop; in Perl 6 please use "loop (;;)" at 
                /tmp/KIPXncZzEo line 1:NL------> for ?(my $i = 1; $i <= 3; 
                $i++) { say $i; }NLFAILED 00:01 107mNL>>
21:10 < coke> rakudo: for (my $i = 1; $i <= 3; $i++) { say $i; }
21:10 <+p6eval> rakudo aa8c65: OUTPUT<<Unsupported use of C-style "for (;;)" 
                loop; in Perl 6 please use "loop (;;)" at line 11, near "(my $i 
                = 1"NLcurrent instr.: 'perl6;HLL;Grammar;panic' pc 500 
                (ext/nqp-rx/src/stage0/HLL-s0.pir:328)NL>>

Needs tests, though.

-- 
Will "Coke" Coleda

Reply via email to