当前位置:网站首页>lua脚本关键
lua脚本关键
2022-08-01 13:08:00 【猿饵块】
函数
函数一定要调用才有效

函数返回值

可变参数函数
不同于其他语言的运算符
不等于
~=
逻辑运算符
没有&&,||这些符号,只用字母
and

注意,第一个结果为true--->才可以输出第二个非布尔值
如果第一个为false 则输出false
or

false才输出
取反运算符--not

连接字符串的运算符-- ..

不能合并输出数据和变量,一定要用..连接发送
算术运算符
lua没有自增,自减
do----end
可以在外部作为局部使用
if---else
不需要括号

循环语句

注意:
1,for循环中一定要定义变量,不能只利用数值
i=1
j=1
print(i)
for 1,100 do
print(j)
tmp=j
j=i+j
i=tmp
end
--报错2,初始值加上步长,终止值是满足条件的
变量
空变量怎么声明
local k=""
边栏推荐
- What is consistent hashing?In what scenarios can it be applied?
- PAT 1162 Postfix Expression(25)
- Software designer test center summary (interior designer personal summary)
- Why does the maximum plus one equal the minimum
- MCU开发是什么?国内MCU产业现状如何
- 动态库、静态库浅析
- Qt实战案例(56)——利用QProcess实现应用程序重启功能
- iframe标签属性说明 详解[通俗易懂]
- NFV迈向云原生时代:Network Service Mesh项目介绍
- NebulaGraph v3.2.0 Performance Report
猜你喜欢
随机推荐
树和二叉树的转换
那些利用假期学习的职场人,后来都怎么样了?
如何设计一个分布式 ID 发号器?
MCU开发是什么?国内MCU产业现状如何
8. How does the SAP ABAP OData service support the Create operation
leetcode:1201. 丑数 III【二分 + 数学 + 容斥原理】
论文笔记All about Eve: Execute-Verify Replication for Multi-Core Servers
34、树莓派进行人体姿态检测并进行语音播报
快速理解拉格朗日乘子法
PanGu-Coder:函数级的代码生成模型
安全又省钱,“15岁”老小区用上管道燃气
什么是一致性哈希?可以应用在哪些场景?
全链路灰度在数据库上我们是怎么做的?
LeetCode_动态规划_中等_313.超级丑数
sql is not null 优化(oracle语句索引优化)
How to Integrate Your Service Registry with Istio?
NebulaGraph v3.2.0 性能报告
iframe tag attribute description detailed [easy to understand]
How to integrate 3rd party service center registration into Istio?
SQL函数 STR









