Code: Alles auswählen
PROCEDURE TestProc3()
tArr1 is array of 2,2 int
tPartArr1 is array of 2 int
tArr2 is Variant
tPartArr2 is Variant
tArr3 is array of arrays of 2 int
// ArrayInsert(tArr1, 1, [1,2])
// ArrayInsert(tArr1, 2, [3,4])
// // [3,4]]
tArr1[1] = [1,2]
tArr1[2] = [3,4]
tArr2 = [[ 1,2],
[3,4]]
tPartArr1 = tArr1[1]
tPartArr2 = tArr2[1]
Ergibt Fehler:
Error:Array with 2 dimension(s): unable to access it with 1 dimension(s).
GlobalProcedures.TestProc3, Local Procedure, line 22, column 19
Error:Array with 2 dimension(s): unable to access it with 1 dimension(s).
GlobalProcedures.TestProc3, Local Procedure, line 16, column 7
Error:Array with 2 dimension(s): unable to access it with 1 dimension(s).
GlobalProcedures.TestProc3, Local Procedure, line 15, column 7
Warning : The local variable 'tArr3' is not used.
GlobalProcedures.TestProc3, Local Procedure, line 9, column 2
Was ich haben möchte ist schon ein Feld mit einem Feld von 2 int Elementen
Also [[1,2],[3.4]]
Und FeldAussen[1] = [1,2]
Jedenfalls klappt es mit Array Insert genau so.
Code: Alles auswählen
PROCEDURE TestProc3()
tArr1 is array of array of 2 int
tPartArr1 is array of 2 int
tArr2 is Variant
tPartArr2 is Variant
tArr3 is array of arrays of 2 int
ArrayInsert(tArr1, 1, [1,2])
ArrayInsert(tArr1, 2, [3,4])
// // [3,4]]
tPartArr1 = tArr1[1]
tPartArr2 = tArr2[1]
Gehe ich über die Vaiant Schiene funktioniert es auch ohne Probleme