diff --git a/Tests/test_table_func.lua b/Tests/test_table_func.lua new file mode 100644 index 0000000..f100fa3 --- /dev/null +++ b/Tests/test_table_func.lua @@ -0,0 +1,21 @@ +-- Tests de fonctions 'redirigées' dans une variable +-- faut voir encore ceci: +-- https://stackoverflow.com/questions/1791234/lua-call-function-from-a-string-with-function-name + +print("\n test_table_func.lua zf180830.1224 \n") + + +function toto() + print("toto") +end + +function tutu(f) + f() +end + +print("fonction dans une fonction") +tutu(toto) + +print("fonction dans une variable") +titi=toto +titi()