Einzelnen Beitrag anzeigen

Benutzerbild von EccoBravo
EccoBravo

Registriert seit: 19. Okt 2004
Ort: Neuruppin
524 Beiträge
 
Delphi 2007 Architect
 
#11

Re: dunkelgrüner Breakpoint ?

  Alt 20. Okt 2005, 18:19
Das ist es ja eben, mein richtiger Code ist genauso wie der Pseudocode, keine Probleme ersichtlich, worüber der Optimizer stolpern könnt. den richtigen Code anzuhängen, würde Euch und die Seitre überfordern, daher nur ein Ausschnitt, der repitorisch wiederholt wird

Delphi-Quellcode:

   ...

   while (iStart < fmax) and (FeldNr<11) do
    begin
        addr:='';
        addr:=addr+IntToHex(buff1[aStart],2);
        addr:=addr+IntToHex(buff1[aStart+1],2);
        addr:=addr+' ';
        addr:=addr+IntToHex(buff1[aStart+2],2);
        addr:=addr+IntToHex(buff1[aStart+3],2);

        if addr='FEFF 00E0'      then begin
                                      if param in['a','p','f'] then begin
                                          j:=j+1;
                                      end;
                                      aStart:=aStart+8; lStart:=aStart+4; iStart:=aStart+8;
                                  end
        else if addr='0800 1600'  then begin
                                      if param in['a'] then begin
                                          j:=j+1;
                                          Plan.Inhalt1:= Lesen(lStart,iStart,Lang);
                                      end
                                      else lang:= Laenge_bestimmen(lStart);
                                      aStart:=aStart+8+lang; lStart:=aStart+4; iStart:=aStart+8;
                                  end
        else if addr='0800 1800'  then begin
                                      if param in['a'] then begin
                                          j:=j+1;
                                          Plan.Inhalt2:= Lesen(lStart,iStart,Lang);
                                      end
                                      else lang:= Laenge_bestimmen(lStart);
                                      aStart:=aStart+8+lang; lStart:=aStart+4; iStart:=aStart+8;
                                  end
        else if addr='0800 2000'  then begin
                                      if param in['a','p'] then begin
                                          j:=j+1;
                                          Plan.Inhalt3:= Lesen(lStart,iStart,Lang);
                                      end
                                      else lang:= Laenge_bestimmen(lStart);
                                      aStart:=aStart+8+lang; lStart:=aStart+4; iStart:=aStart+8;
                                  end
        else if addr='0800 3000'  then begin
                                      if param in['a','p'] then begin
                                          j:=j+1;
                                          Plan.Inhalt4:= Lesen(lStart,iStart,Lang);
                                      end
                                      else lang:= Laenge_bestimmen(lStart);
                                      aStart:=aStart+8+lang; lStart:=aStart+4; iStart:=aStart+8;
                                  end
        else if addr='0800 3010'  then begin
                                      if param in['a','p'] then begin
                                          j:=j+1;
                                          Plan.Inhalt5:= Lesen(lStart,iStart,Lang);
                                      end
                                      else lang:= Laenge_bestimmen(lStart);
                                      aStart:=aStart+8+lang; lStart:=aStart+4; iStart:=aStart+8;
                                  end
        else if addr='0800 5000'  then begin
                                      if param in['a'] then begin
                                          j:=j+1;
                                          Plan.Inhalt6:= Lesen(lStart,iStart,Lang);
                                       end
                                      else lang:= Laenge_bestimmen(lStart);
                                      aStart:=aStart+8+lang; lStart:=aStart+4; iStart:=aStart+8;
                                  end
        else if addr='0800 6000'  then begin
                                      if param in['a','p'] then begin
                                          j:=j+1;
                                          Plan.Inhalt7:= Lesen(lStart,iStart,Lang);
                                      end
                                      else lang:= Laenge_bestimmen(lStart);
                                      aStart:=aStart+8+lang; lStart:=aStart+4; iStart:=aStart+8;
                                  end

   ...

   ...

   ...


       else if addr='0C30 5100then begin
                                    if param in['a'] then begin
                                         j:=j+1;
                                         Feld[FeldNr].Inhalt1:= Lesen(lStart,iStart,Lang);
                                     end
                                     else lang:= Laenge_bestimmen(lStart);
                                     aStart:=aStart+8+lang; lStart:=aStart+4; iStart:=aStart+8;
                                end
       else if addr='0C30 4200then begin
                                    if param in['a'] then begin
                                         j:=j+1;
                                         Feld[FeldNr].Inhalt2:= Lesen(lStart,iStart,Lang);
                                     end
                                     else lang:= Laenge_bestimmen(lStart);
                                     aStart:=aStart+8+lang; lStart:=aStart+4; iStart:=aStart+8;
                                end
       else if addr='0C30 6A00then begin
                                    if param in['a'] then begin
                                         j:=j+1;
                                         Feld[FeldNr].Inhalt3:= Lesen(lStart,iStart,Lang);
                                     end
                                     else lang:= Laenge_bestimmen(lStart);
                                     aStart:=aStart+8+lang; lStart:=aStart+4; iStart:=aStart+8;
                                end
       else if addr='0C30 A000then begin
                                    if param in['a'] then begin
                                         j:=j+1;
                                         Feld[FeldNr].Inhalt4:= Lesen(lStart,iStart,Lang);
                                     end
                                     else lang:= Laenge_bestimmen(lStart);
                                     aStart:=aStart+8+lang; lStart:=aStart+4; iStart:=aStart+8;
                                end
       else if addr='0C30 0A00then begin
                                    if param in['a'] then begin
                                         j:=j+1;
                                         Feld[FeldNr].Inhalt5:= Lesen(lStart,iStart,Lang);
                                     end
                                     else lang:= Laenge_bestimmen(lStart);
                                     aStart:=aStart+8+lang; lStart:=aStart+4; iStart:=aStart+8;
                                end
       else if addr='0AC30 1800then begin
                                    if param in['a'] then begin
                                         j:=j+1;
                                         Feld[FeldNr].Inhalt6:= Lesen(lStart,iStart,Lang);
                                     end
                                     else lang:= Laenge_bestimmen(lStart);
                                     aStart:=aStart+8+lang; lStart:=aStart+4; iStart:=aStart+8;
                                end
       else if addr='0AC30 2300then begin
                                    if param in['a'] then begin
                                         j:=j+1;
                                         Feld[FeldNr].Inhalt7:= Lesen(lStart,iStart,Lang);
                                     end
                                     else lang:= Laenge_bestimmen(lStart);
                                     aStart:=aStart+8+lang; lStart:=aStart+4; iStart:=aStart+8;
                                end


       else begin
             if param in['a'] then begin
                 j:=j+1;
                 Feld[FeldNr].Inhalt8:= Lesen(lStart,iStart,Lang);
             end
             else lang:= Laenge_bestimmen(lStart);
             aStart:=aStart+8+lang; lStart:=aStart+4; iStart:=aStart+8;
       end;
  
   end;

   ...
Mit diesem Programm wird der Inhalt aus einem File herausgefiltert.
Es sind etwa 170 else if Sequenzen.
Die Variable j wird später als Zählergebnis gebraucht.
Ich hoffe, Ihr könnt damit was anfangen

Danke E. B.
  Mit Zitat antworten Zitat