DataObject.GetAttachedDouble

Prototypes

double GetAttachedDouble( String sName, double dDefaultValue )

Return Value

The return value is the attached double-precision value. If there is no attachment with the specified name, the return value is dDefaultValue.

Parameters

String sName
The name of the attachment.

double dDefaultValue
The value to return if there is no attachment with the specified name.

Remarks

This method returns the attachment with the specified name. The attachment must have been added using the method AddAttachedDouble.

The DataObject class enables you to add attachments to a DataObject. This enables you to associate additional information about the data in a DataObject with the DataObject itself. The DataObject does not use your attachments. Note that attachments exist only in memory. They are not stored when you store the DataObject.

Example
declare DataObject dobj = DataObject.Create( "Example" );
x = rannor( 1:100 );
dobj.AddVar( "X", x );

dobj.AddAttachedDouble( "X Mean", x[:] );

mx = dobj.GetAttachedDouble( "X Mean", . );
print mx;
See Also

DataObject.AddAttachedDouble