Okay thanks Bob, I'll look into this and see what I can come up with.
Tim.
________________________________
From: Bob Archer [mailto:[EMAIL PROTECTED]
Sent: Friday, April 18, 2008 8:45 AM
To: Tim Mayert; nant-users@lists.sourceforge.net
Subject: RE: [NAnt-users] Using Integer variables in a loop
Look at the int::parse() function. This should allow you to compare
things numerically.
BOb
________________________________
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Tim
Mayert
Sent: Friday, April 18, 2008 10:37 AM
To: nant-users@lists.sourceforge.net
Subject: [NAnt-users] Using Integer variables in a loop
This may be a dumb question, but how do I use Integer variables in NAnt?
I have a need to keep track of how many occurrences a specific
sub-string appears in each line my output log file. I have a nested
build that will build a few projects one after another. At the end of
each project build I have to check the output log for a specific
sub-string. I use a foreach line loop that will read each line out of
the log and search for this specific sub-string and then if the string
is found then I perform a specific task. Once done then the build will
go onto the next project and start its build. Once it is done then I'll
perform the same steps as above, but since the there may have already
been lines in the log that have been searched and the sub-string
possibly found I want the search to ignore these ones and look for any
new lines with this sub-string.
So I figured that if I can keep track of how many lines found the
sub-string then I would simply have the loop continue past the ones
already found and only if after the count has been reached it finds more
new lines that I would then have it trigger the found task.
So what would be the best way to handle this? How could I keep a running
count of found lines as well as a check to see when it has reached this
count so that I the task can be triggered on the new ones found?
Thanks for any help.
SMART Technologies ULC
Tim Mayert
Build and Installation Engineer
Software Development
Tel. 403.769.8809
Fax 403.769.8701
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
http://www.smarttech.com <http://www.smarttech.com/>
Bringing people and ideas together. (tm)
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users