Author: szabgab Date: 2009-04-29 15:37:10 +0200 (Wed, 29 Apr 2009) New Revision: 26554
Modified: docs/Perl6/Spec/S04-control.pod Log: add some X<> tags Modified: docs/Perl6/Spec/S04-control.pod =================================================================== --- docs/Perl6/Spec/S04-control.pod 2009-04-29 13:24:50 UTC (rev 26553) +++ docs/Perl6/Spec/S04-control.pod 2009-04-29 13:37:10 UTC (rev 26554) @@ -298,6 +298,7 @@ a return type of C<Void>. =head2 The C<while> and C<until> statements +X<while>X<until> The C<while> and C<until> statements work as in Perl 5, except that you may leave out the parentheses around the conditional: @@ -323,6 +324,7 @@ In particular, we now generally use C<for> to iterate filehandles. =head2 The C<repeat> statement +X<repeat>X<while>X<next>X<last>X<redo> Unlike in Perl 5, applying a statement modifier to a C<do> block is specifically disallowed: @@ -391,6 +393,7 @@ bound parameter will be undefined that first time through the loop. =head2 The general loop statement +X<loop> The C<loop> statement is the C-style C<for> loop in disguise: @@ -409,6 +412,7 @@ loop (;;) {...} =head2 The C<for> statement +X<for>X<zip>X<Z>X<STDIN>X<$*IN>X<lines> There is no C<foreach> statement any more. It's always spelled C<for> in Perl 6, so it always takes a list as an argument: @@ -690,6 +694,7 @@ but they may easily be applied to a normal loop. =head1 Switch statements +X<given>X<when>X<switch>X<case>X<default> A switch statement is a means of topicalizing, so the switch keyword is the English topicalizer, C<given>. The keyword for individual @@ -783,6 +788,7 @@ doit() if $_ ~~ 42; =head1 Exception handlers +X<CATCH> Unlike many other languages, Perl 6 specifies exception handlers by placing a C<CATCH> block I<within> that block that is having its exceptions @@ -938,6 +944,7 @@ function most of the time. =head1 The goto statement +X<goto> In addition to C<next>, C<last>, and C<redo>, Perl 6 also supports C<goto>. As with ordinary loop controls, the label is searched for