Skip to content

Instantly share code, notes, and snippets.

@MattRix
Created January 8, 2013 06:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MattRix/4481768 to your computer and use it in GitHub Desktop.
Save MattRix/4481768 to your computer and use it in GitHub Desktop.
Scope differences: C vs C# vs AS3 (using C/C# code, but it applies equally to AS3)
///// Example 1 - C:Valid, C#:Error, AS3:Warning /////
bool isHappy = true;
if(true)
{
bool isHappy = true;
}
///// Example 2 - C:Valid, C#:Error, AS3:Warning /////
if(true)
{
bool isHappy = true;
}
bool isHappy = true;
///// Example 3 - C:Valid, C#:Valid, AS3:Warning /////
if(true)
{
bool isHappy = true;
}
if(true)
{
bool isHappy = true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment