Programming Previous page   Next Page

The Asset fieldcount Method

The asset fieldcount method returns the number of fields in the asset object data structure. fieldcount enables asset child methods to determine the number of fields in the asset object during execution, rather than requiring the child methods to have knowledge of the asset class. This allows you to make changes to the number of fields in the asset class data structure without having to change child-class methods.

The struct function converts an object to its equivalent data structure, enabling access to the structure's contents.


Previous page  The Asset display Method Designing the Stock Class Next page

© 1994-2005 The MathWorks, Inc.