Rework gc descriptor to include size information in more cases.
[mono.git] / mcs / docs / ecma334 / 15.xml
1 <?xml version="1.0"?>
2 <clause number="15" title="Statements">
3   <paragraph>C# provides a variety of statements. <note>[Note: Most of these statements will be familiar to developers who have programmed in C and C++. end note]</note> <grammar_production><name>statement</name> : <rhs><non_terminal where="15.4">labeled-statement</non_terminal></rhs><rhs><non_terminal where="15.5">declaration-statement</non_terminal></rhs><rhs><non_terminal where="15">embedded-statement</non_terminal></rhs></grammar_production><grammar_production><name><non_terminal where="15">embedded-statement</non_terminal></name> : <rhs><non_terminal where="15.2">block</non_terminal></rhs><rhs><non_terminal where="15.3">empty-statement</non_terminal></rhs><rhs><non_terminal where="15.6">expression-statement</non_terminal></rhs><rhs><non_terminal where="15.7">selection-statement</non_terminal></rhs><rhs><non_terminal where="15.8">iteration-statement</non_terminal></rhs><rhs><non_terminal where="15.9">jump-statement</non_terminal></rhs><rhs><non_terminal where="15.10">try-statement</non_terminal></rhs><rhs><non_terminal where="15.11">checked-statement</non_terminal></rhs><rhs><non_terminal where="15.11">unchecked-statement</non_terminal></rhs><rhs><non_terminal where="15.12">lock-statement</non_terminal></rhs><rhs><non_terminal where="15.13">using-statement</non_terminal></rhs></grammar_production></paragraph>
4   <paragraph>The <non_terminal where="15">embedded-statement</non_terminal> nonterminal is used for statements that appear within other statements. The use of <non_terminal where="15">embedded-statement</non_terminal> rather than statement excludes the use of declaration statements and labeled statements in these contexts. <example>[Example: The code <code_example><![CDATA[
5 void F(bool b) {  
6    if (b)  
7    int i = 44;  
8 }  
9 ]]></code_example>results in a compile-time error because an if statement requires an <non_terminal where="15">embedded-statement</non_terminal> rather than a statement for its if branch. If this code were permitted, then the variable i would be declared, but it could never be used. (Note, however, that by placing i's declaration in a block, the example is valid.) end example]</example> </paragraph>
10 </clause>