MODEL MASTER
AN OBJECT-ORIENTED SPREADSHEET FRONT-END

Making spreadsheets safer

Contents Previous Next

MM company example - building a worksheet

So far, we have described a lot of objects. But we still have to tell MM which ones we want to appear in our worksheet. We shall do this now.

object parkinsons is_a company_and_workers
    where
        workforce[0] = 100 &
        (t>0) workforce[t] = workforce[t-1]*2 &
        average_salary[0] = 12000 &
        (t>0) average_salary[t] = average-salary[t-1]*1.5 &
        incomings[0] = 1000 &
        (t>0) incomings[t] = incomings[t-1] * 1.1;

model model1
    models parkinsons.

The model clause generates code for a worksheet. Attributes are allocated to columns and time to rows. By default, the compiler decides which column each attribute occupies.

 


Contents Previous Next

Copyright © 1998 J Ireson-Paine. All rights reserved