command-or-block

Description

XSH2 command or a block of semicolon-separated commands enclosed within braces.

Example 64. Count paragraphs in each chapter

$i=0;
foreach //chapter {
  $c=count(./para);
  $i=$i+1;
  print "$c paragraphs in chapter no.$i";
}