tests/pass/hello.lua

Sat, 21 Sep 2013 14:02:16 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Sat, 21 Sep 2013 14:02:16 +0100
changeset 142
574e0baea136
parent 57
3e148db7f933
permissions
-rw-r--r--

Add math.frexp() and tests (many thanks to Florob and Link Mauve!)

57
3e148db7f933 Add tests/ to the repo
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
1 local a, b = "One", "Deux";
3e148db7f933 Add tests/ to the repo
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
2
3e148db7f933 Add tests/ to the repo
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
3 function pp()
3e148db7f933 Add tests/ to the repo
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
4 local _b = b;
3e148db7f933 Add tests/ to the repo
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
5 a = "Une"
3e148db7f933 Add tests/ to the repo
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
6 local c = "Trois!";
3e148db7f933 Add tests/ to the repo
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
7 local function b()
3e148db7f933 Add tests/ to the repo
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
8 return a, _b, c;
3e148db7f933 Add tests/ to the repo
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
9 end
3e148db7f933 Add tests/ to the repo
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
10 return b;
3e148db7f933 Add tests/ to the repo
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
11 end
3e148db7f933 Add tests/ to the repo
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
12
3e148db7f933 Add tests/ to the repo
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
13 print(pp()())
3e148db7f933 Add tests/ to the repo
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
14
3e148db7f933 Add tests/ to the repo
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
15 print(a)

mercurial