You are not logged in.

Dear visitor, welcome to Jabaco - Community. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

Dani

Intermediate

  • "Dani" started this thread

Posts: 325

Date of registration: Nov 19th 2009

Location: GERMANY

  • Send private message

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