View Single Post
# 4 17-11-2004 , 04:13 PM
Alan's Avatar
Moderator
Join Date: Oct 2002
Location: London, UK
Posts: 2,800
it's called "variable scoping" and a scope is defined by {code}

they are hierarchical and so:

int x = 1;
{
int x = 2;
print x (will print 2)
{
int x = 3;
print x (will print 3)
}
}
print x (will print 1)

user added image
Alan


Technical Director - Framestore

Currently working on: Your Highness

IMDB