os.time() 系统时间 单位秒
--随机数每次都不一样
math.randomseed(os.time())
randVar=math.random (1,10)
print (os.time())
print (randVar)
if randVar<5 then
print("<5")
else
print(">=5")
end
--字符串操作
if aa<1111 then
aa="22"..string.sub(aa,2,string.len(aa))
end
--字符数字转换
print(tonumber(string.sub(tostring(os.time()),8,10)))
math.randomseed(tonumber(string.sub(tostring(os.time()),8,10)))
