Code: Select all
; PB 6.30 beta 5 (x64) on Windows
Macro ShowType (_x_)
Select TypeOf(_x_)
Case #PB_Array
Debug "Array"
Case #PB_Integer
Debug "Integer"
Default
Debug "Other"
EndSelect
EndMacro
Dim a.i(5)
; ShowType(a()) ; -> error (should display "Array")
; ShowType(a(0)) ; -> error (should display "Integer")
How can the return value be #PB_Array, if an array is not accepted as argument for TypeOf()?Return value
The type of the object.
The type can be one of the following values:
#PB_Byte
#PB_Word
#PB_Long
#PB_String
#PB_Structure
#PB_Float
#PB_Character
#PB_Double
#PB_Quad
#PB_List
#PB_Array
#PB_Integer
#PB_Map
#PB_Ascii
#PB_Unicode
#PB_Interface

