Windows批处理脚本中的代码块注释语法
Windows批处理脚本中是否有多行代码块注释的语法?我知道逐行注释的Windows批处理脚本中的代码块注释语法,windows,batch-file,syntax,comments,Windows,Batch File,Syntax,Comments,Windows批处理脚本中是否有多行代码块注释的语法?我知道逐行注释的REM和:,但是注释代码块是没有效率的 我正在寻找PHP中的块注释样式,如下所示: /* This is multi-lines block comment */ 我认为,这可以达到目的 goto:skip1 echo This line should not get executed format c: & echo nor this line :skip1 批处理脚本中没有这样的东西 (gotos除外…您可以使
REM
和:
,但是注释代码块是没有效率的
我正在寻找PHP中的块注释样式,如下所示:
/*
This is multi-lines
block comment
*/
我认为,这可以达到目的
goto:skip1
echo This line should not get executed
format c: & echo nor this line
:skip1
批处理脚本中没有这样的东西
(gotos除外…您可以使用这个看起来更好的技巧
@echo off
setlocal
set comment=goto endcomment
echo This line is executed
%comment%
echo These lines
echo are commented out...
:endcomment
echo The next line to execute
%comment%
You may place here
%$#"#% anything you want.... &!>|<()
:endcomment
echo End of example
@echo关闭
setlocal
set comment=goto endcomment
回显执行此行
%评论%
回音
回声被注释掉了。。。
:endcomment
回显要执行的下一行
%评论%
你可以把它放在这里
%$#“#%任何你想要的…&!>|多行注释,不带goto
s、rem
s和:
@break || (
1 line
2 line
3 line
4 line
5 line
...
)
这就是你要找的吗?事实上…标记为重复。。