Registriert seit: 22. Mär 2005
Ort: Dingolfing
4.129 Beiträge
Turbo Delphi für Win32
|
Re: String
12. Feb 2006, 21:36
Ich würds eher mit downto 1 probieren.
Und da fehlt ein begin...end; ansonsten wird nur gebreakt.:
Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
var
s,zahl:string;
i:Integer;
begin
s:='TEST 38';
for i:=length(s) downto i do
begin
if s[i]=' ' then
break;
zahl:=copy(s,i,MaxInt);
Label1.Caption:=zahl;
end;
end;
end.
Manuel Eberl „The trouble with having an open mind, of course, is that people will insist on coming along and trying to put things in it.“
- Terry Pratchett
|