Subtract()

Namespace ›› System ›› MfFloat ›› Methods ››
Parent Previous Next

Subtract()

OutputVar := instance.Subtract(value)

Subtract(value)

Subtract Float value from current instance of MfFloat.

Parameters

value

The value to Subtract from current instance.
Can be var containing float or any object that IsNumber.

Returns

If ReturnAsObject is true then returns current instance of MfFloat with an updated value; Otherwise returns var containing float.

Throws

Throws MfNotSupportedException if Readonly is true.
Throws MfNullReferenceException if called as a static method.
Throws MfArgumentNullException if value is null.
Throws MfArithmeticException is unable to subtract value.

Example

f := new MfFloat(10.1, true) ; create new MfFloat and set it RetrunAsObject to value to true
f.Subtract(2.1)
fNew := new MfFloat(5.25)
MsgBox % f.Subtract(fNew).Value ; displays 2.750000
MsgBox % f.Subtract(-10.1).Value ; displays 12.850000
MsgBox % f.Subtract(10.5).Subtract(10.3).Value ; displays -7.950000