上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 38 下一页
摘要: optional_function_scope function function_name( argument1, argument2, argument3..., argumentn) function_body return result_params_comma_separated end 阅读全文
posted @ 2020-07-12 22:02 流星曳尾 阅读(204) 评论(0) 推荐(0)
摘要: if(布尔表达式) then --[ 在布尔表达式为 true 时执行的语句 --] end if(布尔表达式) then --[ 布尔表达式为 true 时执行该语句块 --] else --[ 布尔表达式为 false 时执行该语句块 --] end if( 布尔表达式 1) then --[ 阅读全文
posted @ 2020-07-12 17:11 流星曳尾 阅读(129) 评论(0) 推荐(0)
摘要: goto Label :: Label ::用goto实现continue的功能for i=1, 3 do if i <= 2 then print(i, "yes continue") goto continue end print(i, " no continue") ::continue:: 阅读全文
posted @ 2020-07-12 16:59 流星曳尾 阅读(952) 评论(0) 推荐(0)
摘要: while循环 while(condition) do statements end for循环 for var=exp1,exp2,exp3 do statements end 注:var 从 exp1 变化到 exp2,每次变化以 exp3 为步长递增 var,并执行一次 "执行体"。exp3 阅读全文
posted @ 2020-07-12 16:12 流星曳尾 阅读(211) 评论(0) 推荐(0)
摘要: a, b = 10, 2*x <--> a=10; b=2*x多值赋值经常用来交换变量,或将函数调用返回给变量: x, y = y, x -- swap 'x' for 'y' a[i], a[j] = a[j], a[i] -- swap 'a[i]' for 'a[j]' a, b = f() 阅读全文
posted @ 2020-07-12 15:44 流星曳尾 阅读(996) 评论(0) 推荐(0)
摘要: 如题 阅读全文
posted @ 2020-07-10 22:41 流星曳尾 阅读(146) 评论(0) 推荐(0)
摘要: arraylist 声明时不需要指定长度也不需要指定数据类型的数组,所以有数据类型不安全和装箱拆箱引起性能损耗的缺陷。 所以.net 2.0推出list,声明时需指定数据类型。 例: array //定义string[] strs = new string[5]; //赋值 strs[0] = "A 阅读全文
posted @ 2020-07-10 19:35 流星曳尾 阅读(2408) 评论(0) 推荐(0)
摘要: 字符串转化为其他parseInt() parseFloat()int,float转化为字符串 .toString() 阅读全文
posted @ 2020-07-10 17:00 流星曳尾 阅读(123) 评论(0) 推荐(0)
摘要: 矩阵是列优先顺序 阅读全文
posted @ 2020-06-26 16:12 流星曳尾 阅读(355) 评论(0) 推荐(0)
摘要: rt 阅读全文
posted @ 2020-06-26 15:58 流星曳尾 阅读(205) 评论(0) 推荐(0)
上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 38 下一页