In der Laufzeit bekomme ich einen Fehler ""ReDim" used without an array variable."
Allerdings wird 2 Zeilen darüber das Array mit _ArraySearch" noch ordnungsgemäß durchsucht, ist also zu diesem Zeitpunkt ein ordentliches Array. Die Dimensionen liegen zu diesem Zeitpunkt noch unter der "magischen" Grenze von 4096, so dass also kein Fehler "Array maximum size exceeded." kommt.
Würde sich bitte mal jemand den Scriptauszug ansehen und mir einen Tip geben?
Spoiler anzeigen
For $i = 0 To (UBound ($Daten, 1) - 1)
$j = _ArraySearch ($Stamm, ($Daten [$i][1]))
If $j = -1 Then
ReDim $Stamm [UBound ($Stamm, 1) - 1][UBound ($Stamm, 2)]
$fehlStamm = 1
If $i > 0 And ($Daten [$i][1] <> $Daten [$i -1][1]) Then
$file_hwnd = FileOpen (@ScriptDir & "\fehlende Stammdaten.xls",1)
FileWriteLine ($file_hwnd, $Stamm [$i][0] & Chr (09) & Chr (09) & Chr (09) & $Stamm [$i][3])
FileClose ($file_hwnd)
EndIf
EndIf
Next