Hallo ich habe mal wieder ein Problem.
Diesmal kommt eine merkwürdige Fehlermeldung:
Auf Variable 'i' kann wegen Optimierung nicht zugegriffen werdenin einer For Schleife
hier der Quelltext, ist ein teil der FormCreate Prozedur:
Delphi-Quelltext
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28:
| ...
Reset(o); for i:=0 to filesize(o)-1 do begin S:=''; Read(o,d[i]); S:=b[StrToint(d[i].code)].name; if d[i].w11 <> '-1' then S:=S+' '+a[StrToInt(d[i].w11)].shor; if d[i].w12 <> '-1' then S:=S+'+'+a[StrToInt(d[i].w12)].shor; if d[i].w21 <> '-1' then S:=S+' '+a[StrToInt(d[i].w21)].shor; if d[i].w22 <> '-1' then S:=S+'+'+a[StrToInt(d[i].w22)].shor; if d[i].w31 <> '-1' then S:=S+' '+a[StrToInt(d[i].w31)].shor; if d[i].w32 <> '-1' then S:=S+'+'+a[StrToInt(d[i].w32)].shor; if d[i].w41 <> '-1' then S:=S+' '+a[StrToInt(d[i].w41)].shor; if d[i].w42 <> '-1' then S:=S+'+'+a[StrToInt(d[i].w42)].shor; ListBox1.Items.Add(S); end; Closefile(o);
... |
Die Hilfe konnte mir nicht helfen und die Beiträge die die Suchfunktion gefunden hat leider auch nicht...
Nur das man die Optimierung abschalten sollte, aber wie geht das?
Oder gibt es eine andere Möglichkeit?