Autor Beitrag
Caesar44
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 44



BeitragVerfasst: Fr 12.06.09 18:42 
Hallo liebe Community,
ich habe ein Problem, dass mir bereits vorrausgesagt wurde:
Ich habe eine Zählschleife mit der Variable p
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
For p := 9 to 16 do
begin
  If Feld[p] < 4 then
  dec(Feld[p]);
end;


Die soll sich aus 9 ergeben und bis 16 steigen.
Wenn ich dass Programm anhalte zeigt die Variable allerdings an, dass sie bloß Werte von 1-8 hat.
Rechnet das Programm trotzdem mit 9-16 oder wurde das "wegoptimiert"?

Grüße Caesar
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1260

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Fr 12.06.09 18:47 
Moin!

user profile iconCaesar44 hat folgendes geschrieben Zum zitierten Posting springen:
Wenn ich dass Programm anhalte zeigt die Variable allerdings an, dass sie bloß Werte von 1-8 hat.
Rechnet das Programm trotzdem mit 9-16 oder wurde das "wegoptimiert"?
Schalte die Optimierung zum Debuggen aus, sonst stimmen die (Lauf-)Variableninhalte nicht (das hatten wir doch schon, oder? :gruebel:). ;)

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.
Caesar44 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 44



BeitragVerfasst: Fr 12.06.09 18:51 
Ich habe nur den Compiler gefunden, wo man Optimierung abschalten könnte.(gleich Debugger?)
Hat aber nichts gebracht.

Grüße
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1260

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Fr 12.06.09 18:54 
Moin!

user profile iconCaesar44 hat folgendes geschrieben Zum zitierten Posting springen:
Ich habe nur den Compiler gefunden, wo man Optimierung abschalten könnte.(gleich Debugger?)
Die Option gilt ja nur für den Compiler, das ist also schon OK. ;)

user profile iconCaesar44 hat folgendes geschrieben Zum zitierten Posting springen:
Hat aber nichts gebracht.
:gruebel:
Dann halt auf die "altmodische Tour": :nixweiss:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
For p := 9 to 16 do
begin
  ShowMessage(IntToStr(p));
  If Feld[p] < 4 then
  dec(Feld[p]);
end;

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.
Caesar44 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 44



BeitragVerfasst: Fr 12.06.09 20:31 
Ok scheint doch etwas gebracht zu haben, allerdings nicht gleich beim ersten mal als ich es gestartet habe :?:

Grüße und Danke
Boldar
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1555
Erhaltene Danke: 70

Win7 Enterprise 64bit, Win XP SP2
Turbo Delphi
BeitragVerfasst: Fr 12.06.09 22:16 
oder so:
ausblenden Delphi-Quelltext
1:
2:
3:
{$o-}
{...}
{$o+}
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19345
Erhaltene Danke: 1753

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Sa 13.06.09 00:04 
user profile iconCaesar44 hat folgendes geschrieben Zum zitierten Posting springen:
Ok scheint doch etwas gebracht zu haben, allerdings nicht gleich beim ersten mal als ich es gestartet habe :?:
Du musst ggf. unter Projekt das Projekt einmal neu erzeugen.

Und vergiss am besten nicht das nach dem Debuggen wieder zu deaktivieren, ist sonst eben etwas langsamer. ;-)