Tuesday, May 22nd 2012, 1:34am UTC+2

You are not logged in.

  • Login
  • Register

Dani

Trainee

Posts: 68

Location: GERMANY

1

Monday, November 7th 2011, 8:55am

Can not initialize Type variable (multidimensional array)

Hey there,
I have already posted this in the General topics, questions and discussions section. The multidimensional array as part of the type structure causes a compiler error. You can read a bit more about this there.
I just thought it belongs here too!

Jabaco Source

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Option Explicit

Private Type arr 
    a() As Long 
End Type


Public Sub Form_Load()
   Dim arr1 As arr
   'Redim arr1.a(0 To 4) 'works!!
   Redim arr1.a(0 To 4, 1 To 2)
   MsgBox "arr1.a " _
        & Lbound(arr1.a, 1) & " bis " & Ubound(arr1.a, 1) & ", " _
        & Lbound(arr1.a, 2) & " bis " & Ubound(arr1.a, 2)
   Unload Me
End Sub

'ERROR:
'java.lang.VerifyError: (class: Form1, method: Form_Load signature: ()V) Unable To pop operand Off an empty stack
'	at Module1.<clinit>(Module1.jsrc)


Dani

Rate this thread
WoltLab Burning Board