Description
This command declares a view.
Command Syntax
'@x:view' <id> {'[' <view formals> ']'}?
<view formals> ::=
<view formals> ::=
'%' <id>
<view formals> ::=
{<view formal> ','}* <view formal>
<view formal> ::=
<id> {'~' <exp>}?
The following options are permitted.
visible | The view name is declared as visible in the enclosing scope. If visible is specified, then local can not be specified. |
local | The view name is declared as local in the enclosing scope. If local is specified, then visible can not be specified. |
Name Semantics
The view name is declared the scope that surrounds the @x:view command. The view formal <id>s are declared within the @x:view command scope.
Execution Semantics
Execution of the @x:view command associates the view value with the instance of the view name. The result of execution of the @x:view command is null.
Instances of the view declaration are created for each specific view referenced. If the view name has no extension there will be only one instance. If the view name has an extension, then there will be a different instance for each different name extension value list. Instances are created on demand as needed and exist until the scope containing the view command exits. The body of the view command is executed for each view instance when it is created. The result of that execution is discarded.
Examples
See the even example.