-
-
Notifications
You must be signed in to change notification settings - Fork 9
Scope Rules
IsaacShelton edited this page Mar 21, 2022
·
1 revision
There are four main types of scopes:
Scopes end when:
- They are closed (either by
}
or by implicit end of single statement block) - They cease to exist anymore (e.g. when the program exits)
- Terminating statements cause control flow to exit the scope
Examples of terminating statements that can cause control flow to exit the scope:
When a scope ends, two things will take place: