Parameter Declarations

The term parameter is a blanket term which is applied to both floating point and integer variables. There are four keywords available for denoting different types of parameters: Param, Integer, Counter and Flag. The latter three all lead to the creation of integer variables and the only reason for having three different keywords for the same parameter type is so that the semantic function of a particular integer variable is made more clear in a script.

The following are examples of valid parameter declarations:

    Param p1, p2, p3=10.0;
    Integer i1=10, i2=30;
    Counter count=0;
    Flag flag1=false, flag2=true;

As with instruments and devices it is also possible to create (one-dimensional) arrays of parameters in the following ways:

    Param array1[10], array2[20], array3[]={0.1,0.2,0.3,0.4,0.5};
    Integer intArray[5]={1,3,5,7,9};
    Flag flagArray[]={true, false, true, true, false};

Note that in the case of an initialised array (one with initial values in curly brackets) giving the size of the array is optional. However if the size is specified then it must match up with the number of intial values given.


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