Compound Statement

Pascal Syntax

Abstract

The compound statement can be used anywhere a single statement is required by the syntactic rules.  A compound statement is also used as the body of a program, procedure, or function.

Syntax

Syntax Diagram


Compound Statement Syntax Diagram

BNF

<compound-statement>
::= 'BEGIN' <statement-list> 'END'
<statement-list>
::= <statement>
::= <statement-list> ';' <statement>

EBNF

<compound-statement>
::= 'BEGIN' <statement-list> 'END'
<statement-list>
::= <statement> { ';' <statement> } *

Semantics

Remarks

Other Languages

C Now C Compound Statement
C++ Now C++ Compound Statement
Java Now Java Compound Statement
JavaScript Now JavaScript Compound Statement
PHP Now PHP Compound Statement