Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/lua/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Syntax 对…的使用感到困惑。。。卢阿/科罗纳_Syntax_Lua_Coronasdk - Fatal编程技术网

Syntax 对…的使用感到困惑。。。卢阿/科罗纳

Syntax 对…的使用感到困惑。。。卢阿/科罗纳,syntax,lua,coronasdk,Syntax,Lua,Coronasdk,我在研究corona的推送通知,发现了这个页面 我感到困惑的代码是顶部的部分 -- The launch arguments provide a notification event if this app was started when the user tapped on a notification local launchArgs = ... …是什么意思 ..是vararg表达式的语法,在vararg函数中使用 在本例中,…用于脚本的主体。脚本可以被视为vararg函数,因此…以

我在研究corona的推送通知,发现了这个页面

我感到困惑的代码是顶部的部分

-- The launch arguments provide a notification event if this app was started when the user tapped on a notification
local launchArgs = ...

是什么意思

..
是vararg表达式的语法,在vararg函数中使用


在本例中,
用于脚本的主体。脚本可以被视为vararg函数,因此
以下是脚本的参数。

这两个问题不相关,为什么不将其拆分为两个问题?因为它们是无关紧要的问题,如果它们彼此相关,则不需要拆分,当然。然而,这里的两个问题根本不相关。它们都与推送通知文档中混乱的语法有关。你知道我问题的答案吗?我删除了第二个问题。如果你再问一个问题,我也可以回答。注意,这个问题的答案相对比较容易找到。实现我自己的vararg函数后,我得到一个键为1、2、3等的表。在corona launchArgs中,结果是一个键为“notification”等的表。这怎么可能呢?@hamobi:这取决于传递的参数。varargs表达式不能控制得到的值;它只允许您传递多个参数,并根据需要将其解压缩。