${var}与$var的区别,个人总结的看法
${var} set variable 123
${var}类似于变量值,相当于123
$var类似于变量名,指向对应的存储位置,相当于“123”,一般只有在rf关键字为断言的如“should be true"等才使用,在关键字如“log console”或者其他引用的关键字无效
如:
${list} create list 11 22 abc 活动
log to console 值是:${list}(不能写成¥$list,因为log to console不是断言语句)
should be true '${list}[2]'=='abc' 或 $list[2]=='abc'或$list[0]=='11'或${list}[0]==11或@{list}[0]==11或'@{list}[2]'=='abc'(注:不能写成$list[2]==abc或$list[0]==11,不然会报错说$list[2]的值abc没有定义)
注意:
should be true ${list}[2]==abc 注:当值为字母或中文时会报错,abc没有定义;只能写成:'${list}[2]'=='abc'
should be true ${list}[0]==11 注:当值为数字时是正确的,不能写成:'${list}[0]'=='11',否则会报错
随机推荐
- Linux system 初步
快捷键: open a new terminal: ctrl+alt+T; close current terminal: ctrl+shift+W; switch windows: alt+tab ...
- Visibility Graph Analysis of Geophysical Time Series: Potentials and Possible Pitfalls
Tasks: invest papers 3 篇. 研究主动权在我手里. I have to. 1. the benefit of complex network: complex networ ...
- 【转载】各种SQL在PIG中实现
转自:http://guoyunsky.iteye.com/blog/1317084 我这里以Mysql 5.1.x为例,Pig的版本是0.8 同时我将数据放在了两个文件,存放在/tmp/data_f ...
- 并查集-F - How Many Tables
F - How Many Tables 并查集的模板都能直接套,太简单不注释了,就存个代码 #include<bits/stdc++.h> using namespace std; ; i ...
- JS 获取随机颜色值
获取随机颜色值 function fn1(){ return '#' + Math.floor( Math.random() * 0xffffff ).toString(16); } function ...
- OPC通信原理在数采中的应用
OPC通信原理在数采中的应用 OPC是Object Linking and Embedding(OLE)for Process Control的缩写,它是微软公司的对象链接和嵌入技术在过程控制方面的应 ...
- AcWing 790. 数的三次方根
#include<bits/stdc++.h> using namespace std ; int main(){ double x; cin>>x; ,r=; ) { ; i ...
- go基础_定时器
每间隔5s打印一句hello // time_ticker package main import ( "fmt" "time" ) func main() { ...
- Customized Mini LED Keychain For Better Brand Identity
Looking for products that tell people the brand name? Then you'll find an affordable product that wi ...
- IIR filter design from analog filter
Analog filter和digital filter的联系: z变换与Laplace从数学上的关系为: 但这种关系在实际应用上不好实现,因此通常使用biliner transform(https: ...