![]() |
Probleme mit einer For-Schleife
Hi,
sl ist:
Code:
proc ist:
#include
{ class main = StdClass { #proc+ main run #proc- } } proc main { CreateSButton(10, 10, 20, 50) } proc run { main }
Code:
Warum bekomme ich jeweils 2x die Meldung "main is correct" und "run is correct", statt nur 1x (gewünscht) ?
main
run
Delphi-Quellcode:
for i := 0 to sl.Count - 1 do
if Copy(Trim(sl[i]), 1, 4) = 'proc' then for j := 0 to procs.Count - 1 do if Pos(sl[i], procs[j]) > -1 then ShowMessage(procs[j] + ' is correct.'); |
Re: Probleme mit einer For-Schleife
Delphi-Quellcode:
[edit], wobei ich mir nicht ganz sicher bin, was du genau machen willst ...
for i := 0 to sl.Count - 1 do
if Copy(Trim(sl[i]), 1, 4) = 'proc' then for j := 0 to procs.Count - 1 do if Pos(procs[j], sl[i]) > 0 then // <<<<< eventuell mal so probieren ShowMessage(procs[j] + ' is correct.'); |
Re: Probleme mit einer For-Schleife
Thx. Das war es :)
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 12:23 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