In what order are ..() calls processed? in Design Philosophy
|
|
I am busy going through some of the 9 years of BYOND code that I've created and horded in my vile dungeon of archives, and I found a handy little test snippet that I previously ran.
I'm not sure what I mean by "threading backwards/forwards", but this snippet basically shows you the order in which ..() calls are processed if you have lots of statements in your code.
mob/Login() ..() src << "I am login 5! (threading fowards)"
mob/Login() src << "I am login 4! (threading backwards)" ..()
mob/pc/Login() src << " I am login 3! (pc, threading backwards)" ..() src << " I am login 6! (pc, threading fowards)"
mob/pc/thief/Login() src << " I am login 2! (pc/thief, threading backwards)" ..()
mob/pc/thief/Login() src << " I am login 1! (pc/thief, threading backwards)" ..() src << " I am login 7! (pc/thief, threading fowards)"
mob/pc/thief/Login() ..() src << " I am login 8! (pc/thief, threading fowards)"
world/mob = /mob/pc/thief
|
The output would then print out all these lines in numerical order (1,2,3,etc.) - it's of particularly important note that 1 appears before 2, even though they're practically the same, programmatically. This is because 1 appears in code AFTER 2, and therefore when you compile it is similar to being on top of the stack.
Anyways, there you have it! Just in case anyone was wondering, and I doubt you were.
~Polatrite~
|