Block Definition

Block

Block — a piece of source code that is grouped together through various declarations or statements with a possibility of blocks containing other block within it. Block-structured programming is entitled to a few notable benefits such including the possibility of defining variables within one unified block thus avoiding lexical confusion if these variables are present in other parts of the code.

The syntaxes that enable the functionality of blocks are not the same in every programming language. For instance in ALGOL family of languages keywords are used to delimit blocks, including “begin” and “end”. In a general-purpose language C, blocks are defined by symbols of curly braces like “{“ and “}”.