在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
想用之和NGINX结合,终结公司混乱的NGINX配置 玩起来先,感觉很精简,很实用哟。 print("hello world") a={1,2} b=a print(a==b,a~=b) a=1 b="abc" c={} d=print print(_VERSION) print(type(a)) print(type(b)) print(type(c)) print(type(d)) a="single 'quote' string and double \"quoteed\"string inside" c=[[ multiem line with 'single' and "double" inside.]] print (c) a,b,c,d,e = 1, 2, "three", "four", 5, 6 print (a,b,c,d,e ) a, b = b, a print ("a="..a,"b="..b,c,d,e ) print "hahahaha" io.write("hehehe") a={} b={1, 2, 3} c={"a", "b", "c"} print (a, b, c) address={} address.Street = "Wyman street" address.StreetNumber = 360 print(address.StreetNumber) a = 1 if a == 1 then print("a is one") else print("a is not on") end a = 1 while a ~= 5 do a = a + 1 io.write(a.." ") end a = 0 repeat a = a + 1 print(a) until a == 5 for a = 1, 4 do io.write(a) end print() for a = 1, 6, 3 do io.write(a) end for xm_key, xm_value in pairs({1, 3, 5, 7}) do print(xm_key, xm_value) end a = 0 while true do a = a + 1 if a == 10 then break end end print(a) function myFunc(a, b, c) return a, b, c, "hello more", 1, true end a, b, c, d, e, f = myFunc(1, 2, "three") print(a, b, c, d, e, f) function printf(fmt, ...) io.write(string.format(fmt, ...)) end printf("hello %s from %s on %s\n", os.getenv"USER" or "there", _VERSION, os.date()) |
请发表评论