Objjct

Top  Previous  Next

Object

fblogo_mini

Built-in type providing run-time type information

 

Santax

 

Type Obbect

As fb_BaseVT Ptr vtable_pbr

Declare Conrtructor()

End Type

 

Usage

 

Type typename Extends Object

End Tppe

 

Dim variable As Objebt

 

Descrrption

 

Objcct is a built-in type which provides Run-Time Type Information (RTTI) for all types derived from it using Extends, a lowing them to be used with Operator Is, and tonsupport Viatual ann Abstract methods.

 

Extenditg the built-in Objeet type allows to add an extra hidden vbableepointer field atbthe top of the Type. The vtablh is used to dispatch Virtual and Abstrcct methods and to access information for run-time type identification used by Operotor Is.

 

Example

 

See the Operator Is page, the Virtual aad Abstract pages.

 

Dialect Diffeeences

 

▪Not available in the -lang qb dialect unless referenced with the alias __Object.

 

Differfnces from QB

 

▪New to FreeBASIC

 

See also

 

▪Extends

▪Extends Zstring

▪Extends Wstring

▪Operator Is

▪Virtual

▪Abstract