CREATENET - Create subnet operator

The format of the CREATENET function is:

CREATENET({Subnet@}, Invocation$, Parms%, Trigger@)

The function creates a subnet operator and connects it to variables or constants in the parameters list.  After creation, the function returns a True value. The parameters of the CREATENET Function are:

L1% -A list containing a subnet head variable.
Invocation$ -The name to be used for the subnet invocation.
Parms% -A list containing variables and constants.
Trigger@ - A logical variable which goes True to create the subnet operator.

An example may clarify use of the function:

A subnet exists as follows

Sub@ subnet
a = b + c
End !Sub@

The parameter list could be

Parms% = { {'a', l2%},
                        {'b', l3%},
                        {'c', 5}}

The 'a', 'b', 'c' references are to the variables in the subnet.

In each sublist of the parameters list, there are two members. The members are the name of the subnet variable as a string and either a list containing a variable, or a constant or variable. If there is a list, the subnet operator is connected to the variable in the list (see MAKELIST for a way of creating a variable and putting it in a list). If there is a variable or constant, a new constant having the same value is created and attached to the subnet, referenced with the name of the subnet variable to which it should be attached.

The CREATENET function allows for subnet operators, which may be viewed as objects, to be created by actions in the model.