Content deleted Content added
No edit summary Tags: Mobile edit Mobile web edit |
No edit summary Tags: Mobile edit Mobile web edit |
||
Line 1:
The function of blocks in programming is to enable groups of statements to be treated as if they were one statement, and to narrow the [[lexical scope]] of variables, procedures and functions declared in a block so that they do not conflict with variables having the same name used elsewhere in a program for different purposes. In a block-structured programming language, the names of variables and other objects such as procedures which are declared in outer blocks are visible inside other inner blocks, unless they are [[Variable shadowing|shadowed]] by an object of the same name.
|