AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Algorithmus zum ermitteln von Parametern

Ein Thema von Zacherl · begonnen am 19. Jun 2006 · letzter Beitrag vom 19. Jun 2006
 
omata

Registriert seit: 26. Aug 2004
Ort: Nebel auf Amrum
3.154 Beiträge
 
Delphi 7 Enterprise
 
#7

Re: Algorithmus zum ermitteln von Parametern

  Alt 19. Jun 2006, 16:40
So, hab mich auch nochmal dran versucht...

Delphi-Quellcode:
procedure ReadParams(Text:string; Params:TStrings);
var p:string;
    i:integer;
    Quot:boolean;
begin
  Quot:=false;
  p:='';
  for i:=1 to length(Text) do begin
    case Text[i] of
      '-','/': if not Quot then begin
                 if trim(p) <> 'then
                   Params.Append(trim(p));
                 p:='';
               end;
      '"': Quot:=not Quot;
      ' ': if not Quot then begin
                 if trim(p) <> 'then
                   Params.Append(trim(p));
                 p:='';
               end;
    end;
    p:=p + Text[i];
  end;
  if trim(p) <> 'then
    Params.Append(trim(p));
end;
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 16:40 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz