spawnSub (thisFunction);
Starts thisFunction while continuing the current function at the same time. The thisFunction function must take no parameters and will be started the next time the screen updates. Execution of the function containing the call to spawnSub will continue first.
No return value.
var a; sub init () { a = 10; spawnSub (setA); a = 20; say (ego, a); # The ego character will now be saying "20" # The init function will be paused because of the say command... # ...giving the spawned function chance to execute say (ego, a); # The ego character will now be saying "30" } sub setA () { a = 30; }
SLUDGE and this SLUDGE documentation are copyright Hungry Software and contributors 2000-2012