2
if string.sub(_VERSION,1,7)=='Lua 5.0' then
3
-- lua5.0 doesnt have a nice way to do this
4
lib=loadlib('example.dll','Example_Init') or loadlib('example.so','Example_Init')
11
-- Call our gcd() function
15
print("The gcd of",x,"and",y,"is",g)
17
-- Manipulate the Foo global variable
19
-- Output its current value
20
print("Foo = ", example.Foo)
23
example.Foo = 3.1415926
25
-- See if the change took effect
26
print("Foo = ", example.Foo)