cmd值传递求助
cmd吧
全部回复
仅看楼主
level 1
陈球王 楼主
代码如下:
@echo off
set string=helloworld\n\n.\n
set swap=%string%
set swap=%swap:r=%
call :helloworld %swap%
echo %string%
goto :eof
:helloworld
set string=%1
set string=%string:\=%
goto :eof
然而结果是
我先把string变量赋值给swap作为中间变量在传递给:helloworld作为参数的可为什么string变量的值还是改变了呀?
2017年04月19日 08点04分 1
1