Skip to content
Li, Xizhi edited this page Apr 30, 2016 · 1 revision

课程1

程序由函数和数据构成

  • 函数(名):又叫命令。 输入--》输出
  • 数据(名):又叫变量。 或叫输入(变量名)和输出(变量名)
alert("hello");
alert();
local x;
x = alert("hello1");
alert(x)

语法

[local] [数据名 = ]函数名([数据名, 数据名,])
function 函数名(数据名, 数据名,)
    return 数据名;
end
Clone this wiki locally