{{fbdoc item="title" value="Type (Alias)"}}----
Declares an alternative name for a type

{{fbdoc item="syntax"}}##
	**Type** //typename// [[KeyPgAs as]] //symbol//
##
{{fbdoc item="param"}}
	##//typename//## 
		new alternative name.
	##//symbol//## 
		symbol or data type declaration to associate with ##//typename//##. 

{{fbdoc item="desc"}}
	##//symbol//## may refer to any declared data type including a built-in data type, ##[[KeyPgSub Sub]]## or ##[[KeyPgFunction Function]]## pointer, ##[[KeyPgType Type]]## declaration, ##[[KeyPgUnion Union]]## declaration, or ##[[KeyPgEnum Enum]]## declaration.

	A type alias can be used to allow forward declarations of parameters in procedure declarations, but only used with pointers or parameters passed by reference (excluding arrays).
	A type alias can also be used to allow forward declarations of data fields in [[CatPgUserDefTypes User Defined Types]], but only used with pointers.

{{fbdoc item="ex"}}
{{fbdoc item="filename" value="examples/manual/udt/type-fwd.bas"}}%%(freebasic)
TYPE ParentFwd as Parent
TYPE Child
	Name as zstring * 32
	ParentRef AS ParentFwd ptr
	''...
END TYPE

TYPE Parent
	Name as zstring * 32
	ChildList(0 to 9) AS Child
	''...
END TYPE

DIM p AS Parent
p.Name = "Foo"
with p.ChildList(0)
	.Name = "Jr."
	.ParentRef = @p
	'' ...
end with	

with p.ChildList(0)
	print .Name; " is child of "; .parentRef->Name
end with
%%

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

{{fbdoc item="see"}}
	- ##[[KeyPgType Type...End Type]]##
	- ##[[KeyPgTypeTemp Type (Temporary)]]##

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