Just curious! v:\> if ""="" == "" echo yes yes
vefatica May 20, 2008 12,332 134 Syracuse, NY, USA May 23, 2023 #1 Just curious! Code: v:\> if ""="" == "" echo yes yes
Charles Dye Super Moderator Staff member May 20, 2008 4,743 110 Albuquerque, NM prospero.unm.edu May 23, 2023 #2 It's not nice to fool Mother Parser! Reactions: Alpengreis
rconn Administrator Staff member May 14, 2008 12,680 169 May 23, 2023 #3 You provided IF with two test comparisons when it only supports one, so it discarded the first one and used the second. What did you *intend* that malformed IF to do?
You provided IF with two test comparisons when it only supports one, so it discarded the first one and used the second. What did you *intend* that malformed IF to do?
vefatica May 20, 2008 12,332 134 Syracuse, NY, USA May 23, 2023 #4 It came from a statement like this. I almost always quote regexes (whether they need it or not) and in a test, I wanted to use the regex "=". Code: if "%1" != "" (set regex=%1) else (echoerr tgrep: Missing regex & quit) I changed it to this. Code: if *%1* != ** (set regex=%1) else (echoerr tgrep: Missing regex & quit)
It came from a statement like this. I almost always quote regexes (whether they need it or not) and in a test, I wanted to use the regex "=". Code: if "%1" != "" (set regex=%1) else (echoerr tgrep: Missing regex & quit) I changed it to this. Code: if *%1* != ** (set regex=%1) else (echoerr tgrep: Missing regex & quit)