Autor Beitrag
teamwkl
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 37



BeitragVerfasst: Mo 15.08.05 22:19 
Hallo!

Hab da mal eine wohl sehr leiche frage.... ich hab ein array und einen bestimmten wert bei dem ich weiss das er im array vorhanden ist.... wie kann ich erfahren an welcher position im array dieser wert steht??? :oops:


Moderiert von user profile iconChristian S.: Topic aus VCL (Visual Component Library) verschoben am Di 16.08.2005 um 00:20
alzaimar
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2889
Erhaltene Danke: 13

W2000, XP
D6E, BDS2006A, DevExpress
BeitragVerfasst: Mo 15.08.05 22:22 
Wie ist der Wert denn da reingekommen?
teamwkl Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 37



BeitragVerfasst: Mo 15.08.05 22:26 
Beim fuellen eines TImagefeldes uebergebe ich einen Wert an das Array
LigH
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 239

Win98SE, Win2000SP4
D7
BeitragVerfasst: Mo 15.08.05 22:27 
Wenn das Array nicht sortiert ist, oder anderweitig nach bestimmten Regeln gefüllt wurde, hilft eigentlich nur: Abklappern... :roll:

Ist es sortiert, schafft man es erheblich schneller, z.B. durch Binary Search (Intervallschachtelung).
Blawen
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 616
Erhaltene Danke: 33

Win XP, Vista, 7
Delphi 5 Prof., BDS 2006 Prof. RAD Studio XE
BeitragVerfasst: Mo 15.08.05 22:28 
user profile iconteamwkl hat folgendes geschrieben:
Hallo!

Hab da mal eine wohl sehr leiche frage.... ich hab ein array und einen bestimmten wert bei dem ich weiss das er im array vorhanden ist.... wie kann ich erfahren an welcher position im array dieser wert steht??? :oops:

Wenn Du zwar den Wert aber nicht dessen Position kennst, im Prinzip nur durch eine Abfrageschleife.
(z.B. Repeat / Until)