Array in a Structure

jawahar

Member
Licensed User
Longtime User
Hi,
I am just starting with Basic 4 Android. I have defined a structure that has variable length array as below

Type TStock (L() As Double, W() As Double, H() As Double, PartNo() As String, Desc() As String, ItemKey As String)

Later in a Sub, I try to set the length of the array
Dim TEC as TStock

TEC.Initialize
TEC.ItemKey = "TEST"

Dim TEC.L(1), TEC.W(1),TEC.H(1),TEC.PartNo(1) 'This line throws a compiler error

I get the following error while compiling
Parsing code. Error
Error parsing program.
Error description: Unknown type: L
Are you missing a library reference?
Occurred on line: 110
Dim TEC.L(1), TEC.W(1),TEC.H(1),TEC.PartNo(1)


I tried dimensioning each element in separate lines etc. and still the error persists.

Whys is this so and how can I solve this?

Thanks & regards,

Jawahar
 
Top