Add()

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

Add()

Adds Float value to current instance of MfFloat.

OutputVar := instance.Add(value)

Add(value)

Adds Float value to current instance of MfFloat.

Parameters

value

The value to add to 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 add value.

Example

f := new MfFloat(10.1, true) ; create new MfFloat and set it RetrunAsObject to value to true
f.Add(2.1)
fNew := new MfFloat(8.1)
MsgBox % f.Add(fNew).Value ; displays 20.200000
MsgBox % f.Add(-10.1).Value ; displays 10.100000
MsgBox % f.Add(10.5).Add(10.3).Value ; displays 30.900000