mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 09:40:21 +00:00
19 lines
210 B
Perl
19 lines
210 B
Perl
|
|
local a = terralib.global(int)
|
|
local b = terralib.global(5)
|
|
local c = terralib.global(int,3)
|
|
terra foo()
|
|
a = 4
|
|
end
|
|
|
|
|
|
terra bar()
|
|
return c + a + b
|
|
end
|
|
|
|
foo()
|
|
assert(bar() == 12)
|
|
|
|
b:set(4)
|
|
|
|
assert(bar() == 11) |