Works in debugger, not from cmd line

I'm using CMDebug v22.00.42 x64 on Microsoft Windows 7 64-bit [Version 6.1.7601]

MonthName.cmd is as follows;
c:\utils>type monthname.cmd
@for /f "tokens=%1" "delims= " %%G in ('echo Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec') do echo %%G

When I run this from cmd.exe, it does not work, and it is not supposed to work;
c:\utils>MonthName.cmd 6
"delims= " was unexpected at this time.

When I run this from CMDebug, it works;

Under Options, I have CMD Syntax selected.

If I change the line to read "tokens=%1 delims= ", which is the correct syntax, it works both from cmd.exe and CMDebugger.

With CMD Syntax selected, why does the incorrect syntax work from CMDebugger, when it should not?

When you run a batch file in CMDebug, it's actually executing TCC-RT. Selecting CMD syntax sets some internal TCC flags (duplicate CMD bugs, require trailing %'s for variables, only recognize the CMD subset of internal commands, etc.). It doesn't try to dumb down every TCC enhancement for those CMD commands.

Similar threads