Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/batch-file/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Windows批处理脚本中的代码块注释语法_Windows_Batch File_Syntax_Comments - Fatal编程技术网

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除外…您可以使

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除外…

您可以使用这个看起来更好的技巧

@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
 ...
)

这就是你要找的吗?事实上…标记为重复。。