Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
19
Task/Scope-modifiers/11l/scope-modifiers.11l
Normal file
19
Task/Scope-modifiers/11l/scope-modifiers.11l
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
V x = ‘From global scope’
|
||||
|
||||
F outerfunc()
|
||||
V x = ‘From scope at outerfunc’
|
||||
|
||||
F scoped_local()
|
||||
V x = ‘scope local’
|
||||
R ‘scoped_local scope gives x = ’x
|
||||
print(scoped_local())
|
||||
|
||||
F scoped_nonlocal()
|
||||
R ‘scoped_nonlocal scope gives x = ’@x
|
||||
print(scoped_nonlocal())
|
||||
|
||||
F scoped_global()
|
||||
R ‘scoped_global scope gives x = ’:x
|
||||
print(scoped_global())
|
||||
|
||||
outerfunc()
|
||||
Loading…
Add table
Add a link
Reference in a new issue