aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/sledjchisl/script.lua
diff options
context:
space:
mode:
authoronefang2020-09-08 21:34:54 +1000
committeronefang2020-09-08 21:34:54 +1000
commitbd58d3012c26d16150f650c389d1136741d3939d (patch)
tree3d2aec8bfe0a0c9061ddb4814e71aff33b9b8dc8 /src/sledjchisl/script.lua
parentAdd the old bash scripts. (diff)
downloadopensim-SC-bd58d3012c26d16150f650c389d1136741d3939d.zip
opensim-SC-bd58d3012c26d16150f650c389d1136741d3939d.tar.gz
opensim-SC-bd58d3012c26d16150f650c389d1136741d3939d.tar.bz2
opensim-SC-bd58d3012c26d16150f650c389d1136741d3939d.tar.xz
Add the SledjChisl stuff.
Diffstat (limited to '')
-rw-r--r--src/sledjchisl/script.lua18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/sledjchisl/script.lua b/src/sledjchisl/script.lua
new file mode 100644
index 0000000..1e4b909
--- /dev/null
+++ b/src/sledjchisl/script.lua
@@ -0,0 +1,18 @@
1-- script.lua
2
3-- This works coz LuaJIT automatically loads the jit module.
4if type(jit) == 'table' then
5 io.write('script.lua is being run by ' .. jit.version .. ' under ' .. jit.os .. ' on a ' .. jit.arch .. '\n')
6else
7 io.write('script.lua is being run by Lua version ' .. _VERSION .. '\n')
8end
9
10-- Receives a table, returns the sum of its components.
11io.write("The table the script received has:\n");
12x = 0
13for i = 1, #foo do
14 print(i, foo[i])
15 x = x + foo[i]
16end
17io.write("Returning data back to C\n");
18return x