Executable statements define the actions of functions, procedures and rules. They define the logic and actions needed to support the definition of constraints by acting on parameters, local variables and constants. The shortest possible ‘executable‘ statement is just a semicolon. It is called a null statement because it does nothing. Such a statement is not useless, however, as you can use a null statement to stake out territory for future use, or perhaps to make the absence of a statement stand out more clearly as in the example following. The Alias statement gives a short name (alias) to an identifier that might be long or clumsy to write. The alias exists only in the scope of the alias statement and references to the alias is the same as writing out the identifier out in full. The assignment statement is used to give a value to a local variable or parameter. The type of the expression assigned to the variable must be compatible with the variable or parameter. Some assignments are shown below. The target variable and the expression being assigned to it are assignment compatible if any of the following hold true: • The types are the same. • The expression results in a type which is a subtype of the type declared for the variable being assigned to. • The type of the variable being assigned to is a select type and the expression results in a type which is a member of that select type. The Case statement executes one (or perhaps zero) statement based on the value of an expression. The statement executed is chosen depending on the value of the Selector. The case statement consists of an expression, which is the case selector and a list of alternative actions, each one preceded by a case label. Agreement between the type of the case label and the case selector is required. The first occurring statement having a case label that evaluates to the same value of the case selector is executed.
Oxford Scholarship Online requires a subscription or purchase to access the full text of books within the service. Public users can however freely search the site and view the abstracts and keywords for each book and chapter.
If you think you should have access to this title, please contact your librarian.