Autor Beitrag
chris_davidi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 76

Windows 98 SE
Delphi 3
BeitragVerfasst: Mi 10.09.03 15:35 
Hallo...

Wie funktioniert dies? Ich habe zwei Rich-Edit Felder. Wenn eines davon oder beide leer sind, soll das Programm mittels Exit; abgebrochen werden.

ausblenden Delphi-Quelltext
1:
2:
3:
begin
 if RichEdit1.Text := "" or RichEdit2.Text := "" then
 Exit;


Ich bekomme ungültiges Eingabezeichen bei "". Warum das? Was muss ich dort eingeben um es als leeren Wert zu erkennen? Und funktioniert das mit or überhaupt? Habe es mir so gedacht, hoffe mir kann jemand helfen...

Danke im Vorraus.
Gruss
Chris
StefanH
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1144

Win XP
D5 Standard, D7 Pers, D2005 Pers
BeitragVerfasst: Mi 10.09.03 15:40 
ausblenden Delphi-Quelltext
1:
if (RichEdit1.Text=''or (RichEdit2.Text=''then Exit					


Du hast doppelte Anführungszeichen verwendet, und außerdem den Zuweisungsoperator (:=) als Vergleichsoperator benutzt.

Stefan

P.S: Exit beendet nur die Prozedur, die Anwendung musst du mit Application.Terminate beenden, aber vielleicht meinst du ja doch die Prozedur...

_________________
"Als es noch keine Computer gab, war das Programmieren noch relativ einfach."(Edsger W. Dijkstra)
"Ich bin nicht von Sinnen, sondern ich rede wahre und vernünftige Worte." (Paulus)
chris_davidi Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 76

Windows 98 SE
Delphi 3
BeitragVerfasst: Mi 10.09.03 15:43 
Danke, du hast mir sehr weitergeholfen. :) Klappt klasse... Ja, meinte die Prozedur. Diese soll abgebrochen werden, aber das Programm normal weiterlaufen.

Vielen Dank nochmals. :)
StefanH
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1144

Win XP
D5 Standard, D7 Pers, D2005 Pers
BeitragVerfasst: Mi 10.09.03 16:02 
Bitte bitte :lol:


(Ich bin immer froh, wenn ich jemanden helfen kann, dass verdeckt mein eigentliches Unwissen...)

_________________
"Als es noch keine Computer gab, war das Programmieren noch relativ einfach."(Edsger W. Dijkstra)
"Ich bin nicht von Sinnen, sondern ich rede wahre und vernünftige Worte." (Paulus)