Skip to content

Commit 68a913a

Browse files
committed
Merge pull request #239 from baby-gnu/fix/obsolete-implementation-notes
Fix/obsolete implementation notes
2 parents 917addb + ab5de74 commit 68a913a

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

doc/Language/control.pod

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -147,19 +147,13 @@ run the block, or it will return the value which the block produces:
147147
my $c = 0; say (1, (if 1 { $c += 42; 2; }), 3, $c); # says "1 2 3 42"
148148
my $d = 0; say (1, (if 0 { $d += 42; 2; }), 3, $d); # says "1 3 0"
149149
150-
Implementation note: Currently, Rakudo will say "1 Nil 3 0" for the last
151-
example because it is not caught up to this part of the design yet.
152-
153150
For the statement modifier it is the same, except you have the value
154151
of the statement instead of a block:
155152
156153
say (1, (42 if True) , 2); # says "1 42 2"
157154
say (1, (42 if False), 2); # says "1 2"
158155
say (1, 42 if False , 2); # says "1 42" because "if False, 2" is true
159156
160-
Implementation note: Currently, Rakudo will say "1 Nil 2" for the second
161-
example because it is not caught up to this part of the design yet.
162-
163157
The C<if> does not change the topic (C<$_>) by default. In order to access
164158
the value which the conditional expression produced, you have to ask
165159
for it more strongly:
@@ -231,9 +225,6 @@ or the value produced by the block that did run:
231225
(if 0 { $d += 42; "two"; } elsif False { $d += 43; 2; }),
232226
3, $d); # says "1 3 0"
233227
234-
Implementation note: Currently, Rakudo will say "1 Nil 3 0" for the last
235-
example because it is not caught up to this part of the design yet.
236-
237228
It's possible to obtain the value of the previous expression inside an
238229
C<else>, which could be from C<if> or the last C<elsif> if any are
239230
present:
@@ -265,9 +256,6 @@ two differences C<unless> works the same as L<if>:
265256
my $c = 0; say (1, (unless 0 { $c += 42; 2; }), 3, $c); #-> says "1 2 3 42"
266257
my $c = 0; say (1, (unless 1 { $c += 42; 2; }), 3, $c); #-> says "1 3 0"
267258
268-
Implementation note: Currently, Rakudo will say "1 Nil 3 0" for the last
269-
example because it is not caught up to this part of the design yet.
270-
271259
=head3 X<with, orwith, without|control flow,with orwith without>
272260
273261
The C<with> statement is like C<if> but tests for definedness rather than

0 commit comments

Comments
 (0)