Index: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Home > Statement block
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. 1 A typical statement block
int main()
{
return 0;
}
2 A nested statement block
int main()
{
int x=1;
if(x==1)
{
x++;
}
return 0;
}
Read more »