除了傳入參數外,函式也可以回傳值(returning values),如下例:. function add(n) return n + 1 end assert(add(3) == 4). Lua 的函式允許多個回傳值,如下例:.
確定! 回上一頁