
Note: Remember that scope is determined at design time is written at the top of the figure. Line 1: StartCommand let EndCommand myGlobal equals 55 semicolon at indentation level 0. Line 2. function outer open parenthesis close parenthesis open curly brace at indentation level 0. Line 3: StartCommand let End Command foo equals 66 semicolon at indentation level 1. Line 4: function middle open parenthesis close parenthesis open curly brace at indentation level 1. Line 5: StartCommand let bar EndCommand equals 77 semicolon at indentation level 2. Line 6. function inner open parenthesis close parenthesis open curly brace at indentation level 2. Line 7: StartCommand let EndCommand foo equals 88 semicolon at indentation level 3. Line 8: bar equals foo plus myGlobal semicolon at indentation level 3. There are 3 arrows. First arrow starting from line 8 open double quotes foo close double quotes to line 7. Second arrow starting from line 9 open double quotes bar close double quotes to line 5. Third arrow starting from line 9 open double quotes myGlobal close double quotes to line 1 with a note: 4 then finally looks within global scope. Line 9: close curly brace at indentation level 2. Note: 1 looks first within current function. Line 10: close curly brace at indentation level 1. Note: 2 then looks within first containing function. Line 11: close curly brace at indentation level 0. Note: 3 then looks within next containing function.
Back