Block (programming): Difference between revisions

Content deleted Content added
Lir (talk | contribs)
mNo edit summary
Lir (talk | contribs)
mNo edit summary
Line 1:
In [[computer programming]], a '''statement block''' is a section of [[computer code|code]] which is grouped together; much like a [[paragraph]]. In [[C Plus Plus|C++]], statement blocks are enclosed by [[bracket]]s <tt>{}</tt>. Unlike paragraphs, statement blocks can be nested; that is, with one block inside another.
 
==A C++ Statement Block==
<pre>
int main()
Line 9:
</pre>
 
==A Nested C++ Statement Block==
#include <iostream>
<pre>
int main()
Line 16 ⟶ 17:
if (x==1)
{
std::cout<<"text";
}
return 0;