Goto fails when a text endtext block precedes the code

Sep 10, 2009
40
0
The following batch file fails with
TCC 26.00.31 x64 Windows 10 [Version 10.0.19041.508]

Why?

Code:
text
        bla bla
endtext

:xyz
DELAY 1
goto :xyz

Output is:

Code:
D:\Dev\Root>test
text
        bla bla
DELAY 1
goto :xyz
TCC: D:\Dev\Root\test.bat [7]  Sprungmarke (Label) nicht gefunden "xyz"

The translation is: "Label not found"

Reason is the text / endtext block.
 
May 20, 2008
10,780
83
Syracuse, NY, USA
OK here.

Code:
v:\> ver
TCC 26.02.42
Microsoft Windows 10 Pro for Workstations
10.0.18363.1082 (1909)

v:\> type gototest.bat
text
        bla bla
endtext

:xyz
echo foo
delay 1
goto :xyz

v:\> gototest
        bla bla
foo
foo
foo
foo
^C
 
Jun 2, 2008
338
3
I'm sure KATYILH16 is a spammer. All 3 of their posts have spammy links that were edited in after the initial post (that I got emails for without the spammy links).