Forum: Sonstige Fragen zu Delphi
Delphi
by SirThornberry,
21. Mai 2008
dann würde ich es widerum so machen:
function OnlyNumbersInString(aValue: String): String;
var
i, j: integer;
aChars : TSetofChars;
begin
aChars := ;
j := 0;
for i := 1 to Length(aValue) do
Forum: Sonstige Fragen zu Delphi
Delphi
by SirThornberry,
21. Mai 2008
besser so:
function OnlyNumbersInString (const aValue : String) : String;
mit dem Austauschen:
procedure OnlyNumbersInString(var aValue : String);
Forum: Sonstige Fragen zu Delphi
Delphi
by SirThornberry,
21. Mai 2008
schau dir nochmal genau an was ich da geschrieben habe. Bei mir ist es auch keine Funktion mehr sondern eine Procedure.
Forum: Sonstige Fragen zu Delphi
Delphi
by SirThornberry,
21. Mai 2008
optimiert würde ich es dann so machen:
procedure OnlyNumbersInString(var aValue: String; aChars: TSetofChars);
var
i, j: Integer;
begin
j := 0;
for i := 1 to Length(aValue) do
begin
if (aValue in aChars) then