Handling Arguments
    

Sometimes you do not know how many columns of data will be used in each analysis; one time you may need the exec to operate on 10 columns, and the next time on 13 columns. The CK capability also allows you to write an exec that can operate on a variable number of columns.

For example, suppose each month a researcher collects data from tomato plants. Some months she has 20 plants, other months just 5. The data for one month consist of one variable for each plant. First she creates the following Exec, called PLANTS.MTB:

HISTOGRAM C1-CK50

DESCRIBE C1-CK50

ADD K50 50 K51

COPY C1-CK50 C51-CK51

  (etc.)

Then, if she has data on 13 plants, she types:

READ C1-C13

  (data)

END

LET K50 = 13

EXECUTE "PLANTS"