Not logged inOpenClonk Forum
Up Topic Collisions between IDs and variables/functions

This board is threaded (i.e. has a tree structure). Please use the Reply button of the specific post you are referring to, not just any random button. If you want to reply to the topic in general, use the Post button near the top and bottom of the page.

Post Reply
In Response to Newton
You are very negative about Option 1. But actually, I have seen no piece of C4Script code yet in my life that uses var Capitalized variables. The common norm is either lowercase_variables or idHungarian (old), both start with lowercase characters and thus do not conflict with IDs which start uppercase. I predict that variables will almost never shadow out IDs and even if they do at some very seldom places, no unintentional behaviour is triggered:
func DoSomething()
{
  var AquaClonk = GetCursor(0);
  AquaClonk->GoLeft();
}

There might be a definition of that name but it does not matter here, because the scripter is not interested to access it at the same time. Also static variables are normally only used as static const and there exists another naming convention which does not conflict with ids: OCF_Something.

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill