New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parse errors for combinations of 'loop' and 'if'. #292
Comments
From pim.mouss@free.frHi, playing with pugs and parrot compiled perl6 i found this bug: 1st script : #!/usr/local/bin/pugs -w loop (my $i=0;$i<2;$i++) { works well. 2nd script : #!/usr/local/bin/pugs -w my $n=7; works well. 3rd script (is the concatenation of both 1st and 2nd): #!/usr/local/bin/pugs -w loop (my $i=0;$i<2;$i++) { my $n=7; crashes with this error: Here's my pugs version : Version: 6.2.13.11 according pugs -v. and per6 parrot compiled (THIS VERSION): current instr.: 'parrot;PGE::Util;die' pc 119 (runtime/parrot/library/PGE/Util.pir:82) Hope this paste is not too long. Notice : i talked about this error on irc #perl6 and they proposed me to post Kind regards. |
From @pmichaudOn Wed, Sep 03, 2008 at 03:38:29AM -0700, Pim wrote:
If both pugs and rakudo agree on an error, I'd bet that the In this case, the problem is the lack of a space before the loop (my $i=0;$i<2;$i++) { Perl 6 sees the angle bracket following the "$i" as being a S03:2793 notes this explicitly: Note: any operator beginning with C<< < >> must have whitespace So, add a whitespace character in front of the opening angle bracket, $ cat x Thanks! Pm |
The RT System itself - Status changed from 'new' to 'open' |
From @masakPatrick (>):
There's a related problem when using empty parens after the 'loop' $ cat test.p6 $ ./perl6 test.p6 That can't be related to the <...> notation. Are empty parens allowed here? // Carl |
From @pmichaudOn Wed, Sep 03, 2008 at 03:26:03PM +0200, Carl Mäsak wrote:
According to STD.pm, empty parens aren't allowed -- the semicolons loop { ... } or loop (;;) { ... } At present Rakudo understands the first form but not the second Thanks! Pm |
From jswitzer@gmail.com
As of index 78b38ad..61c292d, both forms of the infinite loop function I'm closing this ticket since the original source was missing the |
jswitzer@gmail.com - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#58544 (status was 'resolved')
Searchable as RT58544$
The text was updated successfully, but these errors were encountered: