我希望能够将逗号(call
)传递给:example
@echo off
call :test ,
echo %output%
pause
:test
set "output=%1"
goto :eof
语句并将其用作变量,但以下似乎不起作用:
export LD_LIBRARY_PATH=/path_to_lib_folder/lib:$LD_LIBRARY_PATH
答案 0 :(得分:3)
UIView.animate(withDuration: 3.0, animations: {
// UIView.setAnimationRepeatCount(3.0)
self.leadng.constant = self.view.frame.size.width + self.vwObj.frame.size.width
self.view.layoutIfNeeded()
}, completion: { finished in
UIView.animate(withDuration: 3.0, animations: {
self.leadng.constant = -(self.vwObj.frame.size.width)
})
})
@echo off
call :test ","
echo %output%
pause
goto :eof
:test
set "output=%~1"
goto :eof
是一个分隔符,因此如果您想将其作为文字传递,则需要,
。
要从参数中删除封闭引号,请使用"enclose it in quotes"
。
请注意额外的~
。在goto :eof
发布后,这会跳过:test
代码。
答案 1 :(得分:1)
@echo off
REM Pass the , with Quotes around it.
call :test ","
echo %output%
pause
:test
REM Using ~ to remove the quotes
set "output=%~1"
goto :eof
<强>输出强>
,
Press any key to continue . . .