Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Re-indexes adding 'Basics' many terms. Closes #2165
  • Loading branch information
JJ committed Jul 10, 2018
1 parent 1775e07 commit 535144c
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions doc/Language/101-basics.pod6
Expand Up @@ -70,13 +70,13 @@ Dave has won 2 matches and 6 sets
Charlie has won 1 matches and 4 sets
Beth has won 1 matches and 4 sets
=head3 X<C<v6>>
=head3 X<C<v6>|v6 (Basics)>
Every Perl 6 program should begin with C<use v6;>. This line tells the compiler
which version of Perl the program expects. Should you accidentally run the file
with Perl 5, you'll get a helpful error message.
=head3 X<C<statement>>
=head3 X<C<statement>|statement (Basics)>
A Perl 6 program consists of zero or more statements. A I<statement> ends with
a semicolon or a curly bracket at the end of a line:
Expand All @@ -93,7 +93,7 @@ block, it's visible throughout the remainder of the file (which would
effectively be the enclosing block). A block is any part of the code enclosed
between curly braces C<{ }>.
=head3 X<C<sigil>> and X<C<identifier>>
=head3 X<C<sigil>> and X<C<identifier>|identifier (Basics)>
A variable name begins with a I<sigil>, which is a non-alpha-numeric
symbol such as C<$>, C<@>, C<%>, or C<&>--or occasionally the double
Expand Down Expand Up @@ -132,7 +132,7 @@ it's the argument provided to C<open>.
my @names = $file.get.words;
=end code
=head3 X<C<array>>, X<C<method>> and X<C<invocant>>
=head3 X<C<array>>, X<C<method>|method (Basics)> and X<C<invocant>|invocant (Basics)>
The right-hand side calls a I<method> --a named group of behavior-- named C<get>
on the filehandle stored in C<$file>. The C<get> method reads and returns
Expand Down Expand Up @@ -172,7 +172,7 @@ of these hashes are indexed by the player's name.
}
=end code
=head3 X<C<for>> and X<C<block>>
=head3 X<C<for>|for (Basics)> and X<C<block>>
C<for> produces a loop that runs the I<block> delimited by curly brackets
once for each item of the list, setting the variable C<$line>
Expand Down Expand Up @@ -240,7 +240,7 @@ The C<+=> assignment operator is a shortcut for:
%sets{$p2} = %sets{$p2} + $r2;
=end code
=head3 X<C<Any>> and X<C<+=>>
=head3 X<C<Any>| Any (Basics)> and X<C<+=>>
C<+= $r1> means I<increase the value in the variable on the left by $r1>. In
the first iteration C<%sets{$p1}> is not yet set, so it defaults to a special
Expand Down Expand Up @@ -291,7 +291,7 @@ names. The C<sort> method's argument is a I<block> used to transform the array
elements (the names of players) to the data by which to sort. The array items
are passed in through the I<topic variable> C<$_>.
=head3 X<C<block>>
=head3 X<C<block>|block (Basics)>
You have seen blocks before: both the C<for> loop C<< -> $line { ... } >> and
the C<if> statement worked on blocks. A block is a self-contained piece of
Expand Down Expand Up @@ -326,7 +326,7 @@ on the result of the second sort, and stores the final list in C<@sorted>.
}
=end code
=head3 X<C<say>>, X<C<print>> and X<C<put>>
=head3 X<C<say>| say (Basics)>, X<C<print>| say (Basics)> and X<C<put>|put (Basics)>
To print out the players and their scores, the code loops over C<@sorted>,
setting C<$n> to the name of each player in turn. Read this code as "For each
Expand Down Expand Up @@ -394,7 +394,7 @@ followed by a postcircumfix -- a bracketing pair that follows a
statement. It's also ok to have a method call between the variable name and
the postcircumfix.
=head3 X<C<Zen slice>>
=head3 X<C<Zen slice>| Zen slice (Basics)>
=begin code
my @flavours = <vanilla peach>;
Expand Down

0 comments on commit 535144c

Please sign in to comment.