Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Expand a bit on labels wrt to goto
  • Loading branch information
lizmat committed Jun 12, 2018
1 parent d6698c4 commit 3347f71
Showing 1 changed file with 19 additions and 5 deletions.
24 changes: 19 additions & 5 deletions doc/Language/5to6-perlsyn.pod6
Expand Up @@ -154,10 +154,24 @@ L<here|/language/control#given>.
=head2 Goto
C<goto> I<probably> works similarly in Perl 6 to the way it does in Perl 5.
However, as of this writing, it does not seem to be functional. For what is
planned for C<goto>, see
L<https://design.perl6.org/S04.html#The_goto_statement>.
C<goto> is currently not implemented (yet). Labels B<are> implemented, and
can be used as a target for C<next>, C<last> and C<redo>:
=begin code
FOO: # Labels end with colons, like in Perl 5
for ^10 {
say "outer for before";
for ^10 {
say "inner for";
last FOO;
}
say "outer for after"; # Will not show because of the "last"
}
# outer for before
# inner for
=end code
For what is planned for C<goto>, see L<https://design.perl6.org/S04.html#The_goto_statement>.
=head2 The Ellipsis Statement
Expand Down Expand Up @@ -185,4 +199,4 @@ Details on Perl 6 style pod is at L<https://design.perl6.org/S26.html>.
=end pod

# vim: expandtab softtabstop=4 shiftwidth=4 ft=perl6
# vim: expandtab softtabstop=4 shiftwidth=4 ft=perl6

0 comments on commit 3347f71

Please sign in to comment.