问题2:variable create variable=.MDI.cvj_dir string=(eval("d:"//"\\"//"cvj")) !摘自《机械动力学分析及adams应用教程》第11章
以上命令中的eval()函数在帮助中没有单独详细说明(和c_sysary()和c_errmes()函数一样,有具体介绍吗?),不知道在以上语句中起什么作用?还有前双斜杠“//"在上命令中是起连接(concatenated)作用,文件路径表达方式为什么这样表示,改成:variable create variable=.MDI.cvj_dir string=(eval("d:\cvj")) 是否OK?
因为帮助文件中有以下这么一段话:
Note also for path names on Windows, you can use backslashes as the separators, but you are not required to do so.
You can write portable path names by using the forward slash so Adams/View interprets the following as the same path:
"d:/users/efhl/some.file"
"d:\users\efhl\some.file"
If the file name is to be stored in a string variable, the backslashes would need to be doubled to preserve the file path:
"d:\\users\\efhl\\some.file"