Page 1 of 1

Here a hard problem with function calls.

Posted: 16 Feb 2009 14:24
by mhubers
OK Here it goes...

Let say I have a script that look somewhat like this.

Code: Select all

REM start of script
call:ParsIt T T F "file1.txt"
call:ParsIt T T F "file2.txt"
...
call:ParsIt T T F "file10.txt"

exit /b

::------------------------------------------------------------------------------
::-- Function section starts below here
::-- opt1 = parse or not?   (T|F)
::-- opt2 = count as error? (T|F)
::-- opt3 = format output?  (T|F)
::-- opt4 = logfile
::------------------------------------------------------------------------------
:ParsIt
      rem do some task for the functions
goto:eof


Now that works if I do not call the function to many times. I seem to get max out at around 6 to 8 calls to the function. When you pass this max. It will start to randomly return back. What i mean is as follow:

Output if I do not call this function to many times:
> parse file: file1.txt
> parse file: file2.txt
> parse file: file3.txt
> parse file: file4.txt
> parse file: file5.txt

Output if I go over some max number of times calling the same function:
> parse file: file1.txt
> parse file: file2.txt
> parse file: file6.txt
> parse file: file7.txt
> parse file: file1.txt
> parse file: file2.txt

As you see it will start to randomly jump around the scrip and it will redo many of the calls over and over or it will just do a few and stop.

I have a feeling this is some stack porblem but how do I find out?

Regards,
Mark