|
单字符串和多字符串用来命名variable的name时,引用时注意,如果是单字符串,只需$x,而多字符串,则需加上curly brackets(花括号),${temp}。
lammps-manual-3.2中原话如下:
If the $ is followed by curly brackets, then the variable name is the text inside the curly brackets. If no curly brackets follow the $, then the variable name is the single character immediately following the $. Thus ${myTemp} and $x refer to variable names "myTemp" and "x"
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-9-27 06:26
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社