TCC 25.00.11 x64 Windows 10 [Version 10.0.18362.295]
TCC Build 11 Windows 10 Build 18362
I put a COMMENT...ENDCOMMENT around a section of a batch file whilst debugging to test something out. The commented out code contains a subroutine and its label, and I created a new subroutine with the same label after the comment block with the expectation that the call to the subroutine would skip everything between COMMENT and ENDCOMMENT and find the new subroutine (I based this expectation on the HELP which says "The lines between COMMENT and ENDCOMMENT are not parsed").
However, the gosub found the label with the COMMENT...ENDCOMMENT area and executed the statements in the commented out area. Here's a simple batch file to demonstrate the issue, when run it executes the "echo This is inside the comment block" line:
TCC Build 11 Windows 10 Build 18362
I put a COMMENT...ENDCOMMENT around a section of a batch file whilst debugging to test something out. The commented out code contains a subroutine and its label, and I created a new subroutine with the same label after the comment block with the expectation that the call to the subroutine would skip everything between COMMENT and ENDCOMMENT and find the new subroutine (I based this expectation on the HELP which says "The lines between COMMENT and ENDCOMMENT are not parsed").
However, the gosub found the label with the COMMENT...ENDCOMMENT area and executed the statements in the commented out area. Here's a simple batch file to demonstrate the issue, when run it executes the "echo This is inside the comment block" line:
Code:
@echo off
echo This is before the gosub
gosub Somewhere
echo Returned from gosub
QUIT
COMMENT
This is a comment
Everything until the end of this comment block should not be parsed
:Somewhere
echo This is inside the comment block
return
ENDCOMMENT
:Somewhere
echo This is the correct subroutine
return