Registriert seit: 25. Nov 2005
Ort: München
1.909 Beiträge
Delphi 2010 Professional
|
Re: In Set or Not in Set? Frage zu Set.
6. Okt 2006, 10:06
Zitat von Go2EITS:
Delphi-Quellcode:
Function IsOk(Ch:Char):Boolean;
TYPE
TIntSet = set of char;
VAR
Set1:TIntSet;
begin
Set1:=
if ch in set1
then
begin
Result:=true;
Exit;
end
else
Result:=False;
end;//Function IsOK
urrkks... Wo hast du denn den Code her?
Warum nicht einfach so?
Delphi-Quellcode:
function IsBlablaChar(const c : Char) : Boolean;
begin
result := not (c in [#1..#128, #228, #246, #252, #196, #214, #220, #223]);
end;
Robert Giesecke I’m a great believer in “Occam’s Razor,” the principle which says:
“If you say something complicated, I’ll slit your throat.”
|