Code: Select all
@echo off
rem :: this will produce an error
rem if a equ a
rem :: And this too
rem call if a equ a rem
rem :: But this will not!!!
call if a equ a
rem :: This will not too ((\but in command prompt single % is enough)
call for %%%%a in (.) do
rem :: And this
call if a equ a for %%%%a in (.) do if 1 equ 1 for %%%%a in (.) do if c==c
rem :: And this
call if a equ a for %%%%a in (.) do if 1 equ 1 for %%%%a in (.) do if c==c ( rem rem rem echo something
Though it's not useful at all as it does not work if there is finished statement/command after if/for block. But it is an insane bug and shows that the FOR and IF parsers should have something in common.