{{fbdoc item="title" value="OBJECT"}}----
Built-in type providing run-time type information

{{fbdoc item="syntax"}}##
	[[KeyPgType|type]] **object**
		[[KeyPgType|as]] fb_BaseVT [[KeyPgPtr|ptr]] vtable_ptr
		[[KeyPgDeclare|declare]] [[KeyPgConstructor|constructor]]()
	[[KeyPgEnd|end]] [[KeyPgType|type]]
##
{{fbdoc item="usage"}}##
	[[KeyPgType|type]] //typename// [[KeyPgExtends|extends]] **object**
	[[KeyPgEnd|end]] [[KeyPgType|type]]

	[[KeyPgDim|dim]] //variable// [[KeyPgAs|as]] **object**
##
{{fbdoc item="desc"}}
	**Object** is a built-in type which provides Run-Time Type Information (RTTI) for all types derived from it using ##[[KeyPgExtends|Extends]]##, allowing them to be used with ##[[KeyPgOpIs|Operator Is]]##, and to support ##[[KeyPgVirtual|Virtual]]## and ##[[KeyPgAbstract|Abstract]]## methods.

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

{{fbdoc item="ex"}}
	See the ##[[KeyPgOpIs|Operator Is]]## page, the ##[[KeyPgVirtual|Virtual]]## and ##[[KeyPgAbstract|Abstract]]## pages.

{{fbdoc item="lang"}}
	- Not available in the //[[CompilerOptlang|-lang qb]]// dialect unless referenced with the alias ##**""__Object""**##.

{{fbdoc item="diff"}}
	- New to ""FreeBASIC""

{{fbdoc item="see"}}
	- ##[[KeyPgExtends|Extends]]##
	- ##[[KeyPgExtendsZstring|Extends Zstring]]##
	- ##[[KeyPgExtendsWstring|Extends Wstring]]##
	- ##[[KeyPgOpIs|Operator Is]]##
	- ##[[KeyPgVirtual|Virtual]]##
	- ##[[KeyPgAbstract|Abstract]]##

{{fbdoc item="back" value="CatPgStdDataTypes|Standard Data Types"}}{{fbdoc item="back" value="CatPgUserDefTypes|User Defined Types"}}