RosettaCodeData/Task/Scope-modifiers/Logo/scope-modifiers.logo

16 lines
306 B
Plaintext

make "g 5 ; global
to proc :p
make "h 4 ; also global
local "l ; local, no initial value
localmake "m 3
sub 7
end
to sub :s
; can see :g, :h, and :s
; if called from proc, can also see :l and :m
localmake "h 5 ; hides global :h within this procedure and those it calls
end