Thema: String

Einzelnen Beitrag anzeigen

Benutzerbild von 3_of_8
3_of_8

Registriert seit: 22. Mär 2005
Ort: Dingolfing
4.129 Beiträge
 
Turbo Delphi für Win32
 
#5

Re: String

  Alt 12. Feb 2006, 20: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
  Mit Zitat antworten Zitat