- 博客(5)
- 资源 (3)
- 收藏
- 关注
原创 5分钟学会Lua编程(简明教程)
关键字:and break do else elseif end false goto for function if in local nil not or repeat return then true until while标识符有字母,数字,下划线组成,非数字开头,_这个标识符Lua特意留给用户使用。
2016-11-23 17:15:18 7176 3
原创 大数相乘
local bignum = {}function bignum.len(num) return string.len(num)endfunction bignum.splitAt(num, pos) local low = string.sub(num, -pos) local high = string.sub(num, 1, -pos
2016-11-25 18:42:00 449
原创 大数big number的加减运算
以下是Lua的实现:function plus(str1, str2) local increase = 0 local t = {} local max = math.max(string.len(str1), string.len(str2)) for i = 0, max-1 do local ch1 = string.sub(s
2016-11-25 14:37:34 5946
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人