Handle(object)

Parameters

object - an instance of a custom type

Description

The Handle command allows you to retrieve an integer handle for a specific instance of a custom type.

Because the result is an integer, Handle allows a reference to any type of object to be stored in a standard integer variable where custom type variables may only reference objects of a single specified type. This freedom opens the door for those wishing to implement more abstract functions that can deal with multiple types of data.

See also: Type, Object.

Example

; Handle

Type MYTYPE
Field myint
End Type

For count=1 To 3
temp.MYTYPE=New MYTYPE
Print "temp="+Handle(temp)
Next

temp=First MYTYPE
temp=After temp
Delete temp
Print "Deleted 2nd MYTYPE"
temp.MYTYPE=New MYTYPE

For temp.MYTYPE=Each MYTYPE
Print "temp="+Handle(temp)
Next

WaitKey()
End

Index

Click here to view the latest version of this page online