如果子程序在标量上下文(scalar context)中调用,它将返回为不确定的值,如果子程序在列表上下文(list context)中调用,那么它将返回一个空列表。
基于20个网页-相关网页
标量上下文
Scalar context
以上为机器翻译结果,长、整句建议使用 人工翻译 。
区别在于在标量上下文中的使用(如第二个脚本中使用- n)或在列表上下文中的使用(如第一个脚本所做的)。
The difference lies in using in scalar context (as -n does in the second script) or list context (as the first script does).
youdao
在此上下文中不允许使用子查询。只允许使用标量表达式。
Subqueries are not allowed in this context. Only scalar expressions are allowed.
应用推荐
模块上移
模块下移
不移动