Compound Statements

A compound statement is a way of grouping several statements as if they are one. Compound statements consist of zero or more statements enclosed within curly brackets ({ and }). Variables declared within compound statements have scope limited to the compound statement - see Variable Scope.

Compound statements are most often used to associate a group of statements, rather than just one, with a control structure such as an if statement.