Skip to content

Commit fd28b7e

Browse files
committed
explain terminators
1 parent a9d1cb9 commit fd28b7e

File tree

3 files changed

+14
-8
lines changed

3 files changed

+14
-8
lines changed

docs/appendix-a-index.txt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -562,9 +562,9 @@ creates an alias to a variable at runtime
562562

563563
<a id="semicolon"/><a id="semicolon-terminator"/>
564564
[**;**](tablet-2-basic-syntax.html#statements)
565-
*«terminator»* &mdash;
566-
separates [statements](tablet-2-basic-syntax.html#statements)
567-
(commands) or [array indices](tablet-3-variables#array-slices) &mdash;
565+
«terminator» &mdash;
566+
separates [statements](tablet-2-basic-syntax.html#statements) (commands)
567+
or [array indices](tablet-3-variables#array-slices) &mdash;
568568
example: `@[2;3]` instead of `@a[2][3]`
569569

570570

@@ -951,8 +951,10 @@ context var, result of the last command, can set by topicalizers
951951
**{}**
952952
«terminator» &mdash;
953953
[circumfix](#circumfix-category) operator,
954-
encloses blocks and creates a [*coderef*](appendix-g-glossary.html#coderef),
955-
or a hashref when it is identified as a hash or contains a [**=\>**](#fat-arrow)
954+
encloses [*blocks*](appendix-g-glossary.html#block)
955+
if assigned it creates an anonymous routine,
956+
or a hashref when it is identified as a hash by the
957+
[**hash**](#hash-op) prefix or it contains a [**=\>**](#fat-arrow)
956958

957959
<a id="pipe"/><a id="pipe-op"/><a id="junctive-or"/>
958960
**|**

docs/appendix-g-glossary.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -765,7 +765,7 @@ all details in [that table](appendix-b-grouped.html#smartmatch).
765765

766766
<a id="statement"/>
767767
**statement** &mdash;
768-
smallest standalone element that can be executed,
768+
smallest standalone element of a program that can be executed,
769769
everything smaller is just a [*term*](#term),
770770
larger combinations of them are [*expressions*](#expression)
771771

@@ -810,6 +810,10 @@ not to be confused with [*expression*](#expression)
810810

811811
<a id="terminator"/>
812812
**terminator** &mdash;
813+
character that marks the end of a [*term*](#term), these are
814+
[**;**](appendix-a-index.html#semicolon-terminator) and
815+
[**}**](appendix-a-index.html#curly-brackets-terminator),
816+
[more about statements](tablet-2-basic-syntax.html#statements)
813817

814818
<a id="ternary-operator"/>
815819
**ternary operator** &mdash;

docs/tablet-2-basic-syntax.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ Statements
3939
Unless you use [*blocks*](appendix-g-glossary.html#block), a Perl
4040
program executes one statement after another in linear progression
4141
(from left to right, top down). They have to be separated by
42-
a semicolon (**;**), except before and after a closing curly brace,
43-
where it is optional.
42+
a semicolon ([**;**](appendix-a-index.html#semicolon-terminator)),
43+
except before and after a closing curly brace, where it is optional.
4444

4545
$coderef = sub { fetch_data(); compute() }
4646

0 commit comments

Comments
 (0)