
Zitat von
Nicolai1605:
Als eine einfache Optimierung könntest du das auch wie folgt schreiben
Delphi-Quellcode:
if (LE = 'h') then
begin
case zustand of
1: ...
2: ...
3: ...
4: ...
5: ...
end;
end;
Das würde das ganze etwas verkürzen.
In dem Beispiel geht es noch kürzer:
Delphi-Quellcode:
if (LE = 'h') then
case zustand of
1, 3 : zustand := 2;
else zustand := 5;
end;
Gruß Der Unwissende