ecma262 Posted September 25, 2010 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 Link to comment Share on other sites More sharing options...
historic_bruno Posted September 27, 2010 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... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now