Block (programming): Difference between revisions

Content deleted Content added
mNo edit summary
{{mergefrom|code block}}
Line 1:
{{mergefrom|code block}}
In [[computer programming]], a '''statement block''' is a section of [[computer code|code]] which is grouped together, much like a [[paragraph]]; such blocks consist of one, or more, [[statement (programming)|statements]]. In [[C (programming language)|C]], [[C++]], and some other languages, statement blocks are enclosed by [[bracket|brace]]s <tt>{}</tt>. In [[Ada programming language|Ada]], [[Pascal programming language|Pascal]], and some other languages, blocks are denoted by "begin" and "end" statements. In [[Python programming language|Python]] they are indicated by indentation (the ''[[Off-side rule]]''). Unlike paragraphs, statement blocks can be nested; that is, with one block inside another. Blocks often define the [[Scope_(programming)|scope]] of the identifiers used within.