Code: Select all
type test
redim as string datatable(any)
id as integer
declare sub adddata (s as string,byref d as integer = id)
declare sub listdata
end type
sub test.adddata (s as string,byref d as integer = id)
d+=1
redim preserve datatable(id)
datatable(id-1)=s
end sub
sub test.listdata
for i as integer = lbound(datatable) to ubound(datatable)
print i,datatable(i)
next
end sub
dim as test t
t.adddata ("HELLO")
t.adddata ("WORLD")
t.listdata
sleep
end