/client/proc/test()
return "haha wheee"
/client/verb/validate_test_proc()
src << "ispath(test): [ispath(/client/proc/test)]"
src << "ispath(test,/client): [ispath(/client/proc/test,/client)]"
src << "ispath(test,/client/proc): [ispath(/client/proc/test,/client/proc)]"
src << "istype(test,/client): [ispath(/client/proc/test,/client)]"
src << "istype(test,/client/proc): [ispath(/client/proc/test,/client/proc)]"
src << "hascall(type,test): [hascall(/client,/client/proc/test)]"
src << "hascall(type,full procref as string): [hascall(/client,"/client/proc/test")]"
src << "hascall(src,test): [hascall(src,/client/proc/test)]"
src << "hascall(src,full procref as string): [hascall(src,"/client/proc/test")]"
src << "Actually calling it: [call(src,/client/proc/test)()]"
Produces:
ispath(test): 0
ispath(test,/client): 0
ispath(test,/client/proc): 0
istype(test,/client): 0
istype(test,/client/proc): 0
hascall(type,test): 0
hascall(type,full procref as string): 0
hascall(src,test): 0
hascall(src,full procref as string): 0
Actually calling it: haha wheee
I'd just like to know before I store an ambiguous untyped variable whether or not it's the correct type or going to crash later on when I actually use it.
So far I've just been kind of assuming that I would never pass anything but a proc ref to delegates, but the closer I get to actually relying on proc refs for something important, the more I realize that the complete lack of type safety is terrifying.
For my purposes, I don't care if isproc() also works like istype() or even hascall(), though hascall() working with proc refs would be nice. I know that the calling convention on the back is loose, so that you can :procname() or call("procname"). I just want to know that the type of the variable is a proc ref, so that when variables are being passed back and forth and stuck behind the couch or in weird boxes I know what I have in my hands.