Selectively Distribute ‘Confidential’ Case Statement

2018 ◽  
Vol 20 (8) ◽  
pp. 6-6
Keyword(s):  
1998 ◽  
pp. 96-99
Author(s):  
Eric W. Nikitin
Keyword(s):  

Author(s):  
Douglas Schenck ◽  
Peter Wilson

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. …IF a = 13 THEN ; -- do nothing ELSE b := 5 ; -- otherwise give b a value END_IF ;... 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.


Author(s):  
William Buchanan
Keyword(s):  

1982 ◽  
Vol 12 (9) ◽  
pp. 879-882 ◽  
Author(s):  
John L. Hennessy ◽  
Noah Mendelsohn
Keyword(s):  

Sign in / Sign up

Export Citation Format

Share Document