biology daily - the biology and biochemistry encyclopedia
biology daily articles and research Encyclopedia Dictionary Forums biology research links Weblinks Pictures Articles Blogs Newsletter

Statement block

(Redirected from Block (progamming))

In computer programming, a statement block is a section of code which is grouped together, much like a paragraph; such blocks consist of one, or more, statements. In C, C++, and some other languages, statement blocks are enclosed by braces {}. In Ada, Pascal, and some other languages, blocks are denoted by "begin" and "end" statements. In Python they are indicated by indentation. Unlike paragraphs, statement blocks can be nested; that is, with one block inside another. Blocks often define the scope of the identifiers used within.

A typical statement block

int main()
{
  return 0;
}

A nested statement block

int main()
{
  int x=1;
  if(x==1)
  {
     x++;
  }
  return 0;
}


07-14-2008 23:18:10
The contents of this article are licensed from Wikipedia.org under the GNU Free Documentation License. How to see transparent copy
BiologyDaily.com 2005. Legal info   Privacy