Autor Beitrag
rob87
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 461

Win Me, Win XP Home, Win XP Prof
Delphi 2007 Enterprise
BeitragVerfasst: Di 23.01.07 10:53 
Hallo,

ich möchte, dass wenn ich einen Button drücke, dass der Compiler dann folgendermaßen vorgeht:

Wenn bsw. irgendeine Zahlenkombination drinsteht, dann will ich bestimmen, dass das Programm nur weiterarbeitet, wenn an den bestimmten Stellen vorgegebene Ziffern stehen.

Es is also eine Art Code-Abfrage.

Bsp: Ich gebe 1234 ein, aber ich will dass wenn ich ned 9876 eingebe, eine unterschiedliche aktion gestartet wird, als wenn ich 9876 eingegeben hätte.


Soweit alles klar? *lol* Ich wusste es ned einfacher zu beschreiben.


Vielen Dank
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10183
Erhaltene Danke: 1256

W10ent
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Di 23.01.07 10:55 
Moin!

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
if (Edit1.Text = '1234'then
  ShowMessage('Hallo')
else if (Edit1.Text = '9876'then
  ShowMessage('du')
else if (Edit1.Text = '3847'then
  ShowMessage('da!');

;)

cu
Narses

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

Win Me, Win XP Home, Win XP Prof
Delphi 2007 Enterprise
BeitragVerfasst: Di 23.01.07 10:58 
Dankeschön.


Des is ja total einfach. Und des funktioniert mit Zahlen/Buchstaben-Kombinationen genauso oder?
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10183
Erhaltene Danke: 1256

W10ent
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Di 23.01.07 11:04 
Moin!

user profile iconrob87 hat folgendes geschrieben:
Dankeschön.

Bitteschön. :D

user profile iconrob87 hat folgendes geschrieben:
Und des funktioniert mit Zahlen/Buchstaben-Kombinationen genauso oder?

Yip. ;)

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.