![]() |
![]() |
![]() |
![]() |
switch function
Synopsis
switch returns one of its arguments depending on the value of index. If index is 1, switch returns the first argument. If index is 2, switch returns the second argument, and so on. If index is 0 or greater than the total number of arguments, a null value is returned.
When used as a primitive, switch's first subobject specifies the index; subsequent subobjects specify the arguments. For illustration of such usage, see the example below.
//
// Use switch as a primitive.
// Start by defining an index variable.
//
int i;
//
// Define a switch.
//
switch x {
int index => i;
int val1 = 10;
int val2 = 20;
};
// Define an integer and connect it to switch x.
//
int result => x;Input Ports
Parameters
Output Ports
Description
ConnectionUI provides the Connection Information window, which contains the following information about the current connection:
These values are obtained from the various fields of a connect_information group in another module in the same application. The module, in turn, obtains the values for connect_information fields from the database-independent layer via the connection descriptor for the current connection.
Note: This macro is intended as a template and, as a result, does not have input or output ports. The user is responsible for making the connections between this macro and the source of the data. To do this, the user must create the required input and output ports. See the Network Editor documentation in the AVS/Express User's Guide for details.
This UIwindow is used by the Query and Manipulate macros.
Input
Parameters
Output Port
Example
File
See also related modules
![]() |
![]() |
![]() |
![]() |