Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/list/4.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
List 在Robot框架中,列表变量和包含列表的标量变量之间有什么区别?_List_Variables_Robotframework_Scalar - Fatal编程技术网

List 在Robot框架中,列表变量和包含列表的标量变量之间有什么区别?

List 在Robot框架中,列表变量和包含列表的标量变量之间有什么区别?,list,variables,robotframework,scalar,List,Variables,Robotframework,Scalar,在Robot框架中,我们可以将列表分配给标量变量或列表变量,如下所示: | @{list} = | Create List | a | b | c | | ${scalar} = | Create List | a | b | c | 列表变量和包含列表的标量变量之间有什么区别?对于问题中显示的赋值,没有区别。如果您记录每一个,您将得到完全相同的输出 注意:此功能是在版本2.8中引入的(请参见《机器人框架用户指南》) 当您使用这些值时,就会出现差异。使用@符号引用列表时,列表中的每个元素都

在Robot框架中,我们可以将列表分配给标量变量或列表变量,如下所示:

| @{list} =   | Create List | a | b | c |
| ${scalar} = | Create List | a | b | c |

列表变量和包含列表的标量变量之间有什么区别?

对于问题中显示的赋值,没有区别。如果您记录每一个,您将得到完全相同的输出

注意:此功能是在版本2.8中引入的(请参见《机器人框架用户指南》)

当您使用这些值时,就会出现差异。使用
@
符号引用列表时,列表中的每个元素都将成为一个单元格。在以下示例中,以下三行给出了相同的结果:

| | A keyword that expects three arguments | a | b | c
| | A keyword that expects three arguments | @{list}
| | A keyword that expects three arguments | @{scalar}