Language Reference Guide : System Classes : MoneyObject Class
 
Share this page          
MoneyObject Class
The MoneyObject class provides an object version of a money value. In most circumstances, the simple money data type is sufficient to manipulate money values. However, sometimes an object variant of the simple money data type is useful.
For example, because array row references in OpenROAD must be reference variables and cannot be simple scalar variables, you cannot have an array that contains rows defined as a single money element. However, you can achieve the same functionality by using an array of MoneyObjects and referring to the Value attribute of the MoneyObject to retrieve or set the data.
You can also use money objects to pass money values between frames with the SendUserEvent. By assigning the money object to the messageobject parameter of the method call. For example:
/* declarations in initialize */
mval = money;
mobject = MoneyObject;
...
mval = '300';
mobject.Value = mval;
otherframe.SendUserEvent(eventname = 'someevent',
    messageobject = mobject);
...
For more information about sending data between frames, see the Programming Guide.
To perform operations on a MoneyObject, use the Value attribute, for example:
mobject.Value = abs(mobject.Value);
Inherits From
Object Class
Inherited By
None
Attributes
Value
Methods
None