Variable scope - determining where a variable can be used