Fixed indentation in variables.md

This commit is contained in:
Petr Onderka 2018-08-12 23:46:56 +02:00 committed by GitHub
parent 3507d1de15
commit dd69f7a72c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -14,13 +14,13 @@ In the example
```csharp
class A
{
public static int x;
int y;
public static int x;
int y;
void F(int[] v, int a, ref int b, out int c) {
int i = 1;
c = a + b++;
}
void F(int[] v, int a, ref int b, out int c) {
int i = 1;
c = a + b++;
}
}
```
`x` is a static variable, `y` is an instance variable, `v[0]` is an array element, `a` is a value parameter, `b` is a reference parameter, `c` is an output parameter, and `i` is a local variable.
@ -272,11 +272,11 @@ for ( for_initializer ; for_condition ; for_iterator ) embedded_statement
is done as if the statement were written:
```csharp
{
for_initializer ;
while ( for_condition ) {
embedded_statement ;
for_iterator ;
}
for_initializer ;
while ( for_condition ) {
embedded_statement ;
for_iterator ;
}
}
```
@ -358,10 +358,10 @@ finally *finally_block*
is done as if the statement were a `try`-`finally` statement enclosing a `try`-`catch` statement:
```csharp
try {
try try_block
catch(...) catch_block_1
...
catch(...) catch_block_n
try try_block
catch(...) catch_block_1
...
catch(...) catch_block_n
}
finally finally_block
```
@ -370,31 +370,31 @@ The following example demonstrates how the different blocks of a `try` statement
```csharp
class A
{
static void F() {
int i, j;
try {
goto LABEL;
// neither i nor j definitely assigned
i = 1;
// i definitely assigned
}
static void F() {
int i, j;
try {
goto LABEL;
// neither i nor j definitely assigned
i = 1;
// i definitely assigned
}
catch {
// neither i nor j definitely assigned
i = 3;
// i definitely assigned
}
catch {
// neither i nor j definitely assigned
i = 3;
// i definitely assigned
}
finally {
// neither i nor j definitely assigned
j = 5;
// j definitely assigned
}
// i and j definitely assigned
LABEL:;
// j definitely assigned
finally {
// neither i nor j definitely assigned
j = 5;
// j definitely assigned
}
// i and j definitely assigned
LABEL:;
// j definitely assigned
}
}
}
```