Problem with optimized compilation
Hello erel,
I tried to compile a windows.exe in optimized compilation Mode and get an error. I know the error from a missing Object declaration. But now it is the line where a Sub begins. What is to do?
PS:I only paste the sub because the whole project is to large.
Best regards and a happy new year
bernd goedecke
Sub GetLen <--- Here the compiler produced the error: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
a = 0
tzerr = ""
f=False
Main.DatAnz=0
Dim Main.SpW(Main.SpAnz)
Dim Main.SpWM(Main.SpAnz)
Dim Main.SpTyp(Main.SpAnz)
Dim Main.SpForm(Main.SpAnz)
Dim Main.NumCol(Main.SpAnz)
Dim Main.DatCol(Main.SpAnz)
Dim Main.DezCol(Main.SpAnz)
FStr=""
For i = 0 To Main.SpAnz-1
Main.NumCol(i) = True
Main.DatCol(i) = True
Main.DezCol(i) = True
Next
Do While dum <> EndStr AND dum <> EOF
If Main.DatAnz Mod 100 = 0 Then
TBConDeb.Text = "Ermittle VarChar-Länge: " & Aktdat & " Datensatz:" & Main.DatAnz
DoEvents
End If
If TxtTyp = "SAP Dynamische-Liste" Then
dum = SubString (dum,1, dLen-3)
End If
Main.TempArr() = StrSplit(dum, Delim)
If ArrayLen(Main.TempArr()) <> Main.SpAnz Then
EdKStr = TZErrIn.Show("beheben..","Trennzeichenfehler",dum,0,0)
Main.TempArr() = StrSplit(EdKStr, Delim)
End If
For i = 0 To Main.SpAnz-1
If TxtTyp = "SAP Dynamische-Liste" Then
Main.TempArr(i) = StrEx.Trim(Main.TempArr(i))
End If
If ArrayLen(Main.TempArr()) = Main.SpAnz Then
Main.SpW(i) = StrLength(Main.TempArr(i))
If Main.SpW(i) > Main.SpWM(i) Then
Main.SpWM(i) = Main.SpW(i)
End If
If a > Main.SpAnz-1 Then
If Main.TempArr(i)<>"" Then
Match2.Value = Regex2.Match(Main.TempArr(i))
Match22.Value = Regex22.Match(Main.TempArr(i))
If Match2.Success=False OR Match22.Success=True Then
Main.DezCol(i) = False
End If
Match5.Value = Regex5.Match(Main.TempArr(i))
If IsNumber(Main.TempArr(i)) = False OR Match5.Success=True Then
Main.NumCol(i) = False
End If
Match1.Value = Regex1.Match(Main.TempArr(i))
If Match1.Success=False Then
Main.DatCol(i) = False
End If
End If
End If
Else
For j = 0 To ArrayLen(Main.TempArr())-1
FStr = FStr & CRLF & Main.TempArr(j)
Next
F=True
End If
Next
If F=True Then
tzerr = tzerr & Main.DatAnz+1 & ", "
Msgbox("Trennzeichenfehler in Zeile: " & Main.DatAnz+1 & " " & dum)
F=False
End If
dum = FileRead(c1)
a = a+1
Main.DatAnz = Main.DatAnz+1
Loop
TBConDeb.Text = " Datensätze:" & Main.DatAnz
For i = 0 To Main.SpAnz-1
If i < Main.SpAnz-1 Then
If Main.SpWM(i) < 256 Then
If Main.SpWM(i) < 1 Then
Main.SpTyp(i) = "VARCHAR"
Main.SpWM(i)=1
Main.SpForm(i) = Main.SpWM(i)
Else
Main.SpTyp(i) = "VARCHAR"
Main.SpForm(i) = Main.SpWM(i)
End If
Else
Main.SpTyp(i) = "TEXT"
Main.SpForm(i) = ""
End If
Else
If Main.SpWM(i) < 256 Then
Main.SpTyp(i) = "VARCHAR"
Main.SpForm(i) = Main.SpWM(i)
Else
Main.SpTyp(i) = "TEXT"
'SpForm(i) = ""
End If
End If
If Main.NumCol(i) = True Then
Main.SpTyp(i) = "INTEGER"
End If
If Main.DatCol(i) = True Then
Main.SpTyp(i) = "DATE"
End If
If Main.DezCol(i) = True AND Main.NumCol(i) = False Then
Main.SpTyp(i) = "REAL"
End If
Next
End Sub