Device Declarations

Device declarations are similar to other declarations in that they consist of a type name followed by a comma-separated list of either individual device names or device array names. For example, all the following are valid device declarations:

    Bow bow;
    Hammer hammer;
    Connector connector;
    Stop stop;
    Output output(1);

    Bow bow1, bow2, bowArray[10];
    Hammer hammerArray1[5], hammerArray2[5];
    Output out1(stereo), out2(mono), outArray(stereo)[10];

Note that the syntax used for Output device declarations differs from that used for the other devices. This is because an Output declaration must specify the number of channels for the single output or array of outputs being created. Also note the use of keywords mono and stereo as alternatives to putting the numerical constants 1 and 2 respectively.


©1999,2000 Mark Pearson m.pearson@ukonline.co.uk April 30, 2000