add some lua library

This commit is contained in:
云风
2012-08-09 16:48:28 +08:00
parent d246152ca5
commit 4e50079706
47 changed files with 13562 additions and 0 deletions

17
lua-int64/test.lua Normal file
View File

@@ -0,0 +1,17 @@
lib = require "int64"
local int64 = lib.new
print(lib.tostring(int64 "\1\2\3\4\5\6\7\8"))
a = 1 + int64(1)
b = int64 "\16" + int64("9",10)
print(lib.tostring(a,10), lib.tostring(b,2))
print("+", a+b)
print("-", lib.tostring(a-b,10))
print("*", a*b)
print("/", a/b)
print("%", a%b)
print("^", a^b)
print("==", a == b)
print(">", a > b)
print("#", #a)