From ba82eeef020e32582f672d9fc4296471d9f47a9c Mon Sep 17 00:00:00 2001 From: Juerg Billeter Date: Mon, 12 May 2008 20:40:33 +0000 Subject: [PATCH] Small improvements to statements section 2008-05-12 Juerg Billeter * doc/vala/statements.xml: Small improvements to statements section svn path=/trunk/; revision=1379 --- ChangeLog | 6 ++++++ doc/vala/statements.xml | 32 ++++++++++++++++---------------- 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4762ffa..814d7b7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2008-05-12 Jürg Billeter + * doc/vala/statements.xml: + + Small improvements to statements section + +2008-05-12 Jürg Billeter + * doc/vala/Makefile.am: * doc/vala/attributes.xml: * doc/vala/index.xml: diff --git a/doc/vala/statements.xml b/doc/vala/statements.xml index ec124e1..121b27a 100644 --- a/doc/vala/statements.xml +++ b/doc/vala/statements.xml @@ -6,8 +6,8 @@

The if statement selects a statement for execution based on the value of a boolean expression.

if-statement: - if ( boolean-expression ) embedded-statement - if ( boolean-expression ) embedded-statement else embedded-statement + if ( boolean-expression ) embedded-statement + if ( boolean-expression ) embedded-statement else embedded-statement
@@ -15,17 +15,17 @@ if-statement:

The while statement conditionally executes an embedded statement zero or more times.

while-statement: - while ( boolean-expression ) embedded-statement + while ( boolean-expression ) embedded-statement

The do statement conditionally executes an embedded statement one or more times.

do-statement: - do embedded-statement while ( boolean-expression ) ; + do embedded-statement while ( boolean-expression ) ;

The for statement evaluates a sequence of initialization expressions and then, while a condition is true, repeatedly executes an embedded statement and evaluates a sequence of iteration expressions.

for-statement: - for ( [for-initializer] ; [for-condition] ; [for-iterator] ) embedded-statement + for ( [for-initializer] ; [for-condition] ; [for-iterator] ) embedded-statement for-initializer: local-variable-declaration @@ -39,13 +39,13 @@ for-iterator: statement-expression-list: statement-expression - statement-expression-list , statement-expression + statement-expression-list , statement-expression

Within the embedded statement of a for statement, a break statement can be used to transfer control to the end point of the for statement (thus ending iteration of the embedded statement), and a continue statement can be used to transfer control to the end point of the embedded statement (thus executing another iteration of the for statement).

The foreach statement enumerates the elements of a collection, executing an embedded statement for each element of the collection.

foreach-statement: - foreach ( type identifier in expression ) embedded-statement + foreach ( type identifier in expression ) embedded-statement
@@ -53,23 +53,23 @@ foreach-statement:

The break statement exits the nearest enclosing switch, while, do, for, or foreach statement.

break-statement: - break ; + break ;

The continue statement starts a new iterataion of the nearest enclosing while, do, for, or foreach statement.

continue-statement: - continue ; + continue ;

When multiple while, do, for, or foreach statements are nested within each other, a continue statement applies only to the innermost statement. If a continue statement is not eclosed by a while, do, for, or foreach statement, a compile-time error occurs.

The return statement returns control to the caller of the function member in which the return statement appears.

return-statement: - return [expression] ; + return [expression] ;

The throw statement throws an exception.

throw-statement: - throw expression ; + throw expression ;
@@ -77,8 +77,8 @@ throw-statement:

The try statement provides a mechanism for catching exceptions that occur during execution of a block. Furthermore, the try statement provides the ability to specify a block of code that is always executed when control leaves the try statement.

try-statement: - try block catch-clauses - try block [catch-clauses] finally-clause + try block catch-clauses + try block [catch-clauses] finally-clause catch-clauses: specific-catch-clause @@ -89,13 +89,13 @@ specific-catch-clause: specific-catch-clauses specific-catch-clause specific-catch-clause: - catch ( error-type identifier ) block + catch ( error-type identifier ) block general-catch-clause: - catch block + catch block finally-clause: - finally block + finally block
-- 2.7.4