REFINES: Difference between revisions

From ASCEND
Jump to navigation Jump to search
Restored page from Google Cache, uploaded by John Pye
 
No edit summary
 
Line 13: Line 13:
END car;</source>
END car;</source>


See also [[Object-oriented modelling]].
See also
* [[WHERE]] (more detail about usage)
* [[Object-oriented modelling]].


 
[[Category:Syntax]]
 
 
[[Category:Syntax]]

Latest revision as of 09:29, 31 July 2010

The REFINES keyword is used to declare models as specialisations of more general 'base' models.

MODEL vehicle;
   n_wheels IS_A integer_constant;
END vehicle;

MODEL bicycle REFINES vehicle;
   n_wheels :== 2;
END bicycle;

MODEL car REFINES vehicle;
   n_wheels :== 4;
END car;

See also