ecma262 Posted September 25, 2010 Report Share Posted September 25, 2010 Hi all:Just wanted to know a bit more about the naming conventions for global javascript variables. If this topic was already covered on the wiki, I appreciate a pointer to it. In gui/session_new/session.js, I see global variables like g_EntityStates and g_Players that are prefixed by 'g_'. But, In input.js, I see global variables like mouseX and mouseY that are not prefixed. Is my assumption, that all of the above variables are global, correct?Thanks Quote Link to comment Share on other sites More sharing options...
historic_bruno Posted September 27, 2010 Report Share Posted September 27, 2010 Hi, this topic is covered on the wiki only for C++, and it looks like some of the conventions have been carried over to JS. For example if you look at /gui/gamesetup/gamesetup.js, you'll see all the global variables begin with 'g_'. Maybe input.js predates those conventions and simply hasn't been refactored... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.