''
'' 类型别名:
''
type myint as integer
dim a as myint = 5
print a
''
'' 特别适用于长类型(避免所有类型):
''
type MyProcPtr as function( byval as integer, byval as integer ) as integer
dim p1 as MyProcPtr
dim p2 as MyProcPtr
dim p3 as MyProcPtr
dim p4 as MyProcPtr
''
'' 提前声明:
''
'' 声明 MyType 为尚未执行的类型
type MyType as RealMyType
'' 向前声明的类型可以使用指针和引用
type FooBar
as MyType ptr p
end type
dim as MyType ptr p
declare sub foo( byref x as MyType )
'' 这里的执行
type RealMyType
as integer a, b
end type
''
'' 声明类型的行为:
'' (即void类型,只是一种类型的名字,不是真正的“执行”)
''
type MyAny1 as any
type MyAny2 as MyAny2