TDT4205/exercises/05/vslc/vsl_programs/ps5-codegen1/shadow.vsl

25 lines
396 B
Plaintext
Raw Normal View History

2022-03-31 21:23:57 +02:00
// Checking symbol shadowing
func shadow() begin
var a, b
a := 1
begin
var a
a := 2
b := 40
begin
var a
a := b + 2
print a, b
end
print a
begin
var b
b := 38
a := b + 3
print a, b
end
print a
end
print b
return 0
end