例子
试试下面的例子就明白了在Lua编程语言提供的其他运算符:
复制代码 代码如下:a = \”Hello \”
b = \”World\”
print(\”Concatenation of string a with b is \”, a..b )
print(\”Length of b is \”,#b )
print(\”Length of b is \”,#\”Test\” )
当建立并执行上面的程序它会产生以下结果:
复制代码 代码如下:Concatenation of string a with b is Hello World
Length of b is 5
Length of b is 4
您可能感兴趣的文章:
- Lua中的逻辑运算符使用详解
- Lua中关系运算符的使用教程
- Lua中算术运算符的使用示例
- Lua中的运算符简明总结
- Lua学习笔记之运算符和表达式
- Lua基础之运算符的使用示例