-
-
Notifications
You must be signed in to change notification settings - Fork 8
Function Scope
IsaacShelton edited this page Mar 21, 2022
·
1 revision
The function scope is a scope that exists for the duration of a function call
A common example of a function scope having an impact on the program, is in the destruction of values that have a __defer__
method, such as String
.
import basics
func main {
name String = "Isaac Shelton".clone()
// 'name' is implicitly destroyed at the end of the scope
}