Int_setValue

Homepage
Wrappers

Sets the value stored in the Int object.

Int_setValue(IntObject, value = 0)

Parameters

IntObject The Int object to use for the current operation.
value The value to store in the Int object.

Return Value

The previous value stored in IntObject.

Remarks

If IntObject is NULL (0 or blank), the empty string is returned, to indicate an error.

Related

Int_getValue

Int

Examples

;Creates a new Int initialized to 42
myInt := Int_new(42)

;Sets myInt to 13 (and returns the old value)
oldValue := Int_setValue(myInt, 13)

;Outputs oldValue and the value stored in myInt
MsgBox, % "The previous value for myInt was: " oldValue . "`n"
        . "The current value for myInt is: " Int_getValue(myInt)

Homepage  |  Wrappers