码迷,mamicode.com
首页 > 其他好文 > 详细

参数列表

时间:2016-10-15 22:05:04      阅读:122      评论:0      收藏:0      [点我收藏+]

标签:

#! /bin/sh
echo $0
echo $1
echo $@
echo $#

andy$./test.sh 1 2 3 4 .
/test.sh 1 1 2 3 4 4
print(select(#, ...))
print(select(2, ...))
local arg = select(2, ...)
print("arg=" .. arg)

andy$ lua test.lua 1 2 3
3
2    3
arg=2

 

参数列表

标签:

原文地址:http://www.cnblogs.com/awiki/p/5965368.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!