Autor Beitrag
erikh112
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 20

WIN 2000

BeitragVerfasst: Mo 03.07.06 12:34 
Hallo,

ich habe folgendes Problem.
Ich habe eine Funktion die mir für jeweils einen Wert ein Ergebnis ausspuckt.
Nun soll die Schleife solange durchlaufen werden, bis 3 verschieden Kriterien erfüllt sind:

Bei einem Wert soll ein Vorzeichenwechsel stattfinden (Wert_Alt*Wert_Neu<0)
oder bis ein Maximaler Wert erreicht ist,
oder eine andere Bedingung erfüllt ist (abstand1_abstand2<abstand3)

wie realisier ich das am besten?

wäre super wenn mir da jemand kurz nen tipp geben könnte..

danke
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8554
Erhaltene Danke: 481

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Mo 03.07.06 12:38 
Das sollte es tun (wobei ich mir nciht sicher binm, ob ich die erste Bedingung richtig verstanden habe, oder ob das als if-Abfrage in die Schleife mit rein soll...)
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
repeat
  // jede Menge Code
until (Wert_Alt*Wert_Neu<0)
      OR (Wert = WertMax)
      OR (abstand1_abstand2 < abstand3)

_________________
We are, we were and will not be.
erikh112 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 20

WIN 2000

BeitragVerfasst: Mo 03.07.06 12:50 
hey spitze,

vielen dank für die schnelle hilfe.. kann durchaus sein dass ich noch ein paar fragen hab :-)

Bis dann

Gruß
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8554
Erhaltene Danke: 481

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Mo 03.07.06 12:58 
Kein Problem :D

Wenn die nächsten (Nach-)Fragen hierzu passen, kannst du sie hier dranhängen, ansonsten bitte ein neues Topic aufmachen.

_________________
We are, we were and will not be.