Autor Beitrag
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Do 30.12.04 13:45 
hallo !

wie kann in einer Tstringlist mit logischen operatoren suchen ?? also mir reicht es, wenn ich mit AND arbeiten kann.
kennt da jemand einen fertigen code oder hat jemand eine idee, wie ich das lösen könnte ?

Danke

_________________
In the beginning was the word.
And the word was content-type: text/plain.
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19346
Erhaltene Danke: 1754

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Do 30.12.04 14:28 
Sieh dir mal die Implementierung von IndexOf der TStringList an. Das lässt sich doch einfach so ändern, dass mit and gearbeitet wird. In einer abgeleiteten Komponente meine ich.

Abgesehen davon: Wie ist die Suche gemeint? Wie bei IndexOf mit einem Ergebnis oder mit einer Liste aller Ergebnisse?
matze Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Do 30.12.04 19:07 
achso das hab ich vergessen zu sagen.
ich will ne liste mit allen passenden ergebnissen !

_________________
In the beginning was the word.
And the word was content-type: text/plain.
sourcehunter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 482

Win XP | Suse 10.1
Delphi 2005 Pers.
BeitragVerfasst: Do 30.12.04 22:32 
Wenn dir AND reicht, dann mach beim ersten Durchlauf eine Liste mit dem ersten Begriff, und such dann alle raus, die auch auf den zweiten passen, usw.

_________________
Linux und OpenSource rulez!
matze Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Fr 31.12.04 10:09 
ja so in der art hatte ich mir das schon gedacht, aber ist das nicht enorm langsam ??
also ich hätte das mit ner for schleife gemacht und dann mit pos geprüft.
gibt es da ne schnellere methode ?

_________________
In the beginning was the word.
And the word was content-type: text/plain.
matze Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: So 02.01.05 19:38 
kennt keiner was schenlleres ?

_________________
In the beginning was the word.
And the word was content-type: text/plain.
bis11
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1247
Erhaltene Danke: 2

Apple Mac OSX 10.11

BeitragVerfasst: So 02.01.05 19:48 
Währe für Dich vielleicht nicht eine rekusive Suche etwas ? Schaue Dir das einfach mal an : www.swissdelphicente.../showcode.php?id=738
matze Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: So 02.01.05 20:14 
ich versteh nicht, wie ich das einsezen soll .... :?

_________________
In the beginning was the word.
And the word was content-type: text/plain.
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19346
Erhaltene Danke: 1754

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Mo 03.01.05 10:30 
Nochmal zur Implementierung der TStringList: IndexOf ist doch richtig, eventuell auch Find (weiß ich grad nicht, was das macht :oops: , oder: :idea: doch: war das für sortierte Listen? ). Jedenfalls nutzen diese Methoden nicht das langsame Pos, sondern schnellere Assembler-Routinen.
Einfach Strg festhalten und auf Find oder IndexOf klicken.
matze Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Mo 03.01.05 11:16 
achso das meinst du !

jo danke !

_________________
In the beginning was the word.
And the word was content-type: text/plain.