For global vars % for normal scope
by Thomas Natale · in Torque Game Engine · 07/29/2005 (5:18 pm) · 2 replies
Being a heavy PHP programmer... I find it very difficult to get accustomed to typing a % before variable names.. since all php variables start with $... I was just wondering why the choice was made to make local scope variables begin with % and only global vars start with $?
What would have to be done to the source code to swap the two ? ( I know it might be difficult lol)
What would have to be done to the source code to swap the two ? ( I know it might be difficult lol)
#2
It really wouldn't be worth it.. lol
Thanks for replying.. I was just curious..
07/29/2005 (6:08 pm)
Haha! of course, the old incompatibility! It really wouldn't be worth it.. lol
Thanks for replying.. I was just curious..
Associate Kyle Carter
It's defined in a few places in the script code; and the $ is used in the C++ code a bit to reference globals. I bet you could make the switch in a week. Of course, then you'd be totally incompatible with any other Torque code out there. :)