Autor Beitrag
spoof
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 48



BeitragVerfasst: Mi 16.10.13 18:08 
Hey, kann mir wer sagen wieso das nich geht?
ausblenden Delphi-Quelltext
1:
2:
3:
if Pos('Test:', loadedfile.Strings[i]) <> 0 and
   Pos('Test2:', loadedfile.Strings[i+1]) <> 0  and
   Pos('Test3:', loadedfile.Strings[i+2]) <> 0 then


wenn ich ohne and mache also nur pos von test dann geht es aber mit and 2 und and 3 nich mehr wieso?
Mathematiker
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2622
Erhaltene Danke: 1448

Win 7, 8.1, 10
Delphi 5, 7, 10.1
BeitragVerfasst: Mi 16.10.13 18:11 
Hallo,
mehrere Tests müssen einzeln geklammert werden, d.h.
ausblenden Delphi-Quelltext
1:
2:
3:
if (Pos('Test:', loadedfile.Strings[i]) <> 0and
   (Pos('Test2:', loadedfile.Strings[i+1]) <> 0)  and
   (Pos('Test3:', loadedfile.Strings[i+2]) <> 0then

Beste Grüße
Mathematiker

_________________
Töten im Krieg ist nach meiner Auffassung um nichts besser als gewöhnlicher Mord. Albert Einstein

Für diesen Beitrag haben gedankt: spoof
spoof Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 48



BeitragVerfasst: Mi 16.10.13 18:13 
user profile iconMathematiker hat folgendes geschrieben Zum zitierten Posting springen:
Hallo,
mehrere Tests müssen einzeln geklammert werden, d.h.
ausblenden Delphi-Quelltext
1:
2:
3:
if (Pos('Test:', loadedfile.Strings[i]) <> 0and
   (Pos('Test2:', loadedfile.Strings[i+1]) <> 0)  and
   (Pos('Test3:', loadedfile.Strings[i+2]) <> 0then

Beste Grüße
Mathematiker


Ah mist das vergess ich immer wieder :D