[prev in list] [next in list] [prev in thread] [next in thread] 

List:       perl6-language
Subject:    [svn:perl6-synopsis] r14436 - doc/trunk/design/syn
From:       larry () cvs ! develooper ! com
Date:       2007-08-08 0:36:04
Message-ID: 20070808003604.5D925CBA7E () x12 ! develooper ! com
[Download RAW message or body]

Author: larry
Date: Tue Aug  7 17:36:03 2007
New Revision: 14436

Modified:
   doc/trunk/design/syn/S04.pod

Log:
Now require explicit termination of line-medial statements consistently.


Modified: doc/trunk/design/syn/S04.pod
==============================================================================
--- doc/trunk/design/syn/S04.pod	(original)
+++ doc/trunk/design/syn/S04.pod	Tue Aug  7 17:36:03 2007
@@ -12,9 +12,9 @@
 
   Maintainer: Larry Wall <larry@wall.org>
   Date: 19 Aug 2004
-  Last Modified: 2 Jun 2007
+  Last Modified: 7 Aug 2007
   Number: 4
-  Version: 59
+  Version: 60
 
 This document summarizes Apocalypse 4, which covers the block and
 statement syntax of Perl.
@@ -173,6 +173,17 @@
     sub f { 3 }; sub g { 3 };
     sub f { 3 }; sub g { 3 }    # the trailing semicolon is optional
 
+Though certain control statements could conceivably be parsed in a
+self-contained way, for visual consistency all statement-terminating
+blocks that end in the middle of a line I<must> be terminated by
+semicolon unless they are naturally terminated by some other statement
+terminator:
+
+    while yin() { yang() }  say "done";      # ILLEGAL
+    while yin() { yang() }; say "done";      # okay, explicit semicolon
+    @yy := [ while yin() { yang() } ];       # okay within outer [...]
+    while yin() { yang() } ==> sort          # okay, ==> separates statements
+
 =head1 Conditional statements
 
 The C<if> and C<unless> statements work much as they do in
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic