ID:178840
 
if you have something like this:


proc/alpha()
beta()
gamma()

proc/beta()
..()
sleep(10)
whoever << "1"

proc/gamma()
whoever << "2"


Will this output 2 then 1? The way I understand it, ..() turns a single code pathway into a parallel process, but I'm not exactly sure (even the other discussions didn't quite clarify this point).
Will this output 2 then 1? The way I understand it, ..() turns a single code pathway into a parallel process, but I'm not exactly sure (even the other discussions didn't quite clarify this point).

Nope -- here's how it'll work:

proc/alpha()
beta()
gamma()

proc/beta()
..() //this does nothing -- there is no parent to /proc/beta
sleep(10)
whoever << "1"

proc/gamma()
whoever << "2"


This would mimic:

proc/alpha()
sleep(10)
whoever << "1"
whoever << "2"


What ..() does is call the parent/default process. For example:

mob/verb/stamp()
usr << "You stamp your foot angrily."
oview() << "[usr] stamps \his foot angrily."

mob/Superman/stamp()
..() //do what normal /mob/verb/stamp() does

view() << "The earth shakes!!!"
for(var/mob/M in view())
M.Move(get_step(M, pick(NORTH, NORTHEAST, EAST, SOUTHEAST, SOUTH, SOUTHWEST, WEST, NORTHWEST) ) )


Now, if a normal person uses "stamp", the following message will be displayed:

You stamp your foot angrily.

If Superman used "stamp", however, the following would be displayed:

You stamp your foot angrily.
The earth shakes!!!

...and everyone in view of Superman would randomly move, presumably due to impact tremors.
In response to Spuzzum
I see . . . thanks.