On Wed, Sep 03, 2008 at 03:26:03PM +0200, Carl Mäsak wrote:
> Patrick (>):
> > If both pugs and rakudo agree on an error, I'd bet that the
> > problem is in the program and not the compiler(s).  :-)
> >
> > In this case, the problem is the lack of a space before the
> > angle bracket in the loop statement:
> 
> There's a related problem when using empty parens after the 'loop'
> keyword, however:
> 
> $ cat test.p6
> loop () {
> }
> my $n
> 
> $ ./perl6 test.p6
> Statement not terminated properly at line 1, near "{\n}\nmy $n\n"
> [...]
> 
> That can't be related to the <...> notation. Are empty parens allowed here?

According to STD.pm, empty parens aren't allowed -- the semicolons
are required.  One can write an infinite loop as either

    loop { ... }

or

    loop (;;) { ... }

At present Rakudo understands the first form but not the second
(patches welcome -- mainly the grammar just needs to treat the
expressions as optional instead of required).

Thanks!

Pm

Reply via email to