HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Comparison between 2 function calls

02-06-2007, 08:30 PM#1
Joker
What is the difference between
Collapse JASS:
call functionname()
and
Collapse JASS:
call ExecuteFunc( "functionname" )
other than the fact that the 1st one can create variables for the function is calling
02-06-2007, 08:36 PM#2
moyack
call ExecuteFunc( "functionname" ) will run this function in parallel with the remaining script.
02-06-2007, 08:45 PM#3
wyrmlord
ExecuteFunc:

1. Call a function by passing a string value
2. Call a function anywhere in the script (I think)
3. Starts the function in a new thread, meaning that the function you called it from won't wait for the other function to end before going on to the next line of code
02-06-2007, 08:50 PM#4
PipeDream
ExecuteFunc crashes at run time if you get the name wrong instead of save time
02-06-2007, 09:17 PM#5
moyack
Check this tutorial to get a better idea about ExecuteFunc.
02-07-2007, 09:52 AM#6
Captain Griffen
Quote:
Originally Posted by moyack
call ExecuteFunc( "functionname" ) will run this function in parallel with the remaining script.

Not in parallel but in series. The ExecuteFunc thread will run first (until it hits the end/a wait) and then back to the calling function.

Two threads cannot run at the same time.