Here a hard problem with function calls.

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
mhubers
Posts: 4
Joined: 15 Feb 2009 21:29
Location: Madison, WI.

Here a hard problem with function calls.

#1 Post by mhubers » 16 Feb 2009 14:24

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

Post Reply