Skip to content
Paul Squires edited this page Sep 19, 2026 · 1 revision

Home › Standard Data Types › Object

Object

Built-in type providing run-time type information

Syntax

Type Object
As fb_BaseVT Ptr vtable_ptr
Declare Constructor()
End Type

Description

Object is a built-in type which provides Run-Time Type Information (RTTI) for all types derived from it using Extends, allowing them to be used with Operator Is, and to support Virtual and Abstract methods.

Extending the built-in Object type allows to add an extra hidden vtable pointer field at the top of the Type. The vtable is used to dispatch Virtual and Abstract methods and to access information for run-time type identification used by Operator Is.

Remarks

Usage

Type typename Extends Object

End Type

Dim variable As Object

Dialect Differences

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

Differences from QB

  • New to FreeBASIC

See also

Examples

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


Category: Standard Data Types
Kind: type


Reproduced from the FreeBASIC Wiki Manual under the GNU Free Documentation License 1.3 — with no Invariant Sections, no Front-Cover Texts and no Back-Cover Texts. Copyright © the FreeBASIC project and wiki contributors. See License.

Clone this wiki locally