Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想将宏变量中的任何句点实例更改为下划线。我究竟做错了什么?
%let pow=0.1; %let x = %sysfunc(tranwrd(&pow,".","_")); %put x=&x;
输出:
x=0.1
%sysfunc 中没有引号,除非您指的是引号字符。(翻译至少会隐藏问题,但 TRANWRD 正在查看 &pow 并试图找到“。”但失败了。)
%let pow=0.1; %let x = %sysfunc(tranwrd(&pow,.,_)); %put x=&x;