Kids.Net.Au - Search engine for kids,
teachers, parents, children and schools

Search the Internet for Kids!
Google
 
Web Kids.Net.Au
Sign Up for our Cool Newsletter!
Email:
Web Sites Encyclopedia Dictionary Thesaurus
Search
Google
 
Web
Kids.Net.Au
Encyclopedia
 
Sponsors
 
Encyclopedia > Dynamic scoping

Article Content

Dynamic scoping

Dynamic variable scoping is when you scope a variable in a programming language by replacing the existing variable of that name with a new variable temporarily, for instance for the duration of a function call. This is an easy way to implement private variables. However the problem is that if one function calls another, the other may accidentally modify the first function's variables when it intended to modify a global variable instead. Therefore over time it is becoming more common for programming languages to implement private variables with lexical variable scoping instead.



All Wikipedia text is available under the terms of the GNU Free Documentation License

Link to Kids.Net.Au | About Us | Submit a question, comment or suggestion

Kids.Net.Au - kids safe portal for children, parents, schools and teachers.