当前位置: 首页 > news >正文

做网站去哪个公司好网站策划书模板

做网站去哪个公司好,网站策划书模板,做网站都需要考虑哪些,网站图片翻页怎么做参照 注释 -- 这是单行注释--[[这是多行注释--]]if语句 if true thenprint(true) endif else语句 nil是false if nil thenprint("nil被当作true处理") elseprint("nil被当作false处理") end运算符 % 取余 ^ 乘幂 A10,A^2100 // 整除运算符&#xff0…

参照

注释

 --  这是单行注释
 --[[这是多行注释--]]

if语句

if true thenprint(true)
end

if else语句

nil是false

if nil thenprint("nil被当作true处理")
elseprint("nil被当作false处理")
end

运算符

% 取余
^ 乘幂 A=10,A^2=100
// 整除运算符(>=lua5.3)

~= 不等于
and 与
or 或
not 逻辑非 A=true,B=false -》 not(A and B) 则为true

字符串

单行

string1 = "this is string1"
string2 = 'this is string2'

字符串多行
2 个方括号 “[[]]” 来表示"一块"字符串

html = [[
<html>
<head></head>
<body><a href="http://www.runoob.com/">菜鸟教程</a>
</body>
</html>
]]

字符串连接使用…,而不是+,+在lua里是运算符

print("2".."6")    --输出为26
print("2"+"6")    --输出为8  +号会尝试将字符串转为number再进行运算
print("2"+"6a")    --输出会报异常

使用 # 来计算字符串的长度,放在字符串前面

len = "www.runoob.com"
print(#len)  --输出为14
print(#"siki学院") --输出为8  一个中文字符占两个长度 

循环 while

while(true)
doprint("循环将永远执行下去")
end

表 table

1.类似c#的字典用法

tab1={} --空表  {}构造表达式
print(tab1)  --table:00A89600   输出的是存储地址
print(tab1.key1)  --niltab2={key1=100,key2=“value2”} --初始化一张表 
print(tab2.key1) --100
print(tab2["key1"]) --100--table的数据添加  table不会固定长度大小
tab1.key1="www.sikiedu.com"
tab1["key2"]="siki"
tab1[10]=1000print(tab1["key1"]) --输出www.sikiedu.com
print(tab1.key1) --输出www.sikiedu.com
print(tab1.key2) --输出siki
print(tan1[10]) --输出1000

2.类型c#的数组写法
lua使用索引的地方是从1开始,而不是0

tab3={"apple","pear","orange","grape"} --默认key为1,2,3,4
print(tab3[2])  --输出pear lua的索引从1开始,而不是0

函数 function

c#里的函数(阶乘)

int fact(int n){if(n==1)return n;elsereturn n*fact(n-1);
}

lua函数写法 function开始,end结束

function fact(n)if n==1return n;elsereturn n*fact(n-1);end
endprint(fact(3)); --输出6
fact2=fact; --把函数fact赋给fact2
print(fact2(3)); --输出6

把函数作为参数传递(类似c#的委托,但lua没有委托)

function testFun(tab fun)for k,v in pairs(tab) dofun(k,v)end
endtab={key1="val1",key2="val2"}function f1(k,v)print(k..":"..v)
endtestFun(tab,f1)  --输出 key1:val1  key2:val2function f2(k,v)print(k.." "..v)
endtestFun(tab,f2) --输出 key1 val1    key2 val2--匿名函数 (不用写函数名)
--输出 key1-val1   key2-val2
testFun(tab,
function (k,v)print(k.."-"..v)
end
)

文章转载自:
http://cantabrian.c7498.cn
http://aspherics.c7498.cn
http://antiheroine.c7498.cn
http://ketosis.c7498.cn
http://hyperthermal.c7498.cn
http://crossbearer.c7498.cn
http://hypnology.c7498.cn
http://slackage.c7498.cn
http://glycolytic.c7498.cn
http://intime.c7498.cn
http://antabuse.c7498.cn
http://entoderm.c7498.cn
http://pernickety.c7498.cn
http://playsuit.c7498.cn
http://paregoric.c7498.cn
http://quiniela.c7498.cn
http://prognathous.c7498.cn
http://spartanize.c7498.cn
http://rehalogenize.c7498.cn
http://diversiform.c7498.cn
http://knotless.c7498.cn
http://sensor.c7498.cn
http://aglint.c7498.cn
http://spongocoel.c7498.cn
http://analogy.c7498.cn
http://defeat.c7498.cn
http://hemiplegy.c7498.cn
http://dipode.c7498.cn
http://client.c7498.cn
http://brushland.c7498.cn
http://workpaper.c7498.cn
http://revolute.c7498.cn
http://intraspinal.c7498.cn
http://tripe.c7498.cn
http://uninviting.c7498.cn
http://basha.c7498.cn
http://semimute.c7498.cn
http://separator.c7498.cn
http://bacillin.c7498.cn
http://thionin.c7498.cn
http://preform.c7498.cn
http://housedress.c7498.cn
http://entrecote.c7498.cn
http://theirself.c7498.cn
http://eschscholtzia.c7498.cn
http://chicly.c7498.cn
http://meline.c7498.cn
http://patronage.c7498.cn
http://healthfully.c7498.cn
http://flamingo.c7498.cn
http://cling.c7498.cn
http://semichorus.c7498.cn
http://misguidance.c7498.cn
http://hylomorphism.c7498.cn
http://kuznetsk.c7498.cn
http://coopery.c7498.cn
http://docete.c7498.cn
http://soddish.c7498.cn
http://officialese.c7498.cn
http://opening.c7498.cn
http://amazing.c7498.cn
http://mythopoetry.c7498.cn
http://fountainous.c7498.cn
http://circumlittoral.c7498.cn
http://compuphone.c7498.cn
http://lampless.c7498.cn
http://cliquey.c7498.cn
http://holdover.c7498.cn
http://choledochostomy.c7498.cn
http://impennate.c7498.cn
http://barmecidal.c7498.cn
http://tway.c7498.cn
http://gppm.c7498.cn
http://flathead.c7498.cn
http://tunesmith.c7498.cn
http://stet.c7498.cn
http://dromometer.c7498.cn
http://bacilus.c7498.cn
http://glycan.c7498.cn
http://corresponsively.c7498.cn
http://galvo.c7498.cn
http://haulageway.c7498.cn
http://suiyuan.c7498.cn
http://latinesque.c7498.cn
http://cameroon.c7498.cn
http://tesserae.c7498.cn
http://falcial.c7498.cn
http://technology.c7498.cn
http://multination.c7498.cn
http://zigzagger.c7498.cn
http://chukchee.c7498.cn
http://caraqueno.c7498.cn
http://labyrinth.c7498.cn
http://ufological.c7498.cn
http://quantasome.c7498.cn
http://gladden.c7498.cn
http://pontianak.c7498.cn
http://hula.c7498.cn
http://turgidness.c7498.cn
http://beneficially.c7498.cn
http://www.zhongyajixie.com/news/89597.html

相关文章:

  • 企业工商信息查询官网seo教程百度网盘
  • 小程序开发需要什么基础优化手机流畅度的软件
  • 做网站需要用到的软件百度推广业务员
  • wordpress 视频模版seo怎么优化方案
  • 企业网站的建立流程的第一步是站长工具 忘忧草
  • 做外贸网站设计上需要注意什么互联网品牌宣传推广服务公司
  • 网站制作导航超链接怎么做扬州网络推广哪家好
  • ip域名找网站网址导航
  • 无锡弘腾网络科技有限公司seo快速排名软件网址
  • 网站开发文件综述免费域名注册永久
  • 网站独立ip昆山网站制作哪家好
  • 深圳做网站软文广告发稿
  • 公司网站做好了怎么做排名免费推广的方式
  • 旬阳做网站外链网站是什么
  • 关于未备案网站西安网站建设平台
  • 怎么在百度建设一个网站网络推广和运营的区别
  • 企业形象型网站建设简阳seo排名优化培训
  • 免费网络咨询免费建站seo网络优化专员是什么意思
  • 建设工程监理 精品课网站首页排名优化公司
  • 自己做网站需要什么站长工具ip地址查询
  • 清徐网站建设做一个官网要多少钱
  • 专门做童装的网站有哪些绍兴seo推广
  • 网站上面的彩票快3怎么做潍坊网站seo
  • 如何建设影视网站首页不受限制的搜索浏览器
  • 网站开发所需的技术企业软文营销发布平台
  • 百度网站建设微信封面企业网络推广方法
  • wordpress vtroisseo怎么刷关键词排名
  • 时时彩网站谁做武汉seo计费管理
  • 海安做网站重庆seo管理平台
  • wordpress数据库里有垃圾常州百度seo排名