NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

9.1 Blocks

Statements are organized into blocks, which are made up of labeled lines. Each labeled line begins with an optional label declaration, followed by zero or more statements delimited by colons.

A method has a single declaration space for labels, and the scope of a label is the body of the method. Names referenced in GoTo statements are resolved in this space. The label declaration space is not nested in any other declaration space. Note that because both labels and statements are delimited with colons, it is possible for a label declaration to look like a statement; label declaration always takes precedence in any ambiguous situation. Labels may be either identifiers or integer literals.

Execution of a block begins with the first statement in the block. Once a statement has been executed, the next statement is lexical order is executed, unless a statement transfers execution elsewhere or an exception occurs.

Block ::= [ LabeledLine+ ]
LabeledLine ::= [ LabelName : ] [ Statements ] LineTerminator
LabelName ::= Identifier | IntLiteral
Statements ::=
 [ Statement ] |
 Statements [ Statement ]