title: Batch numeric comparison with if statement
body: <p>I have searched for the correct syntax when using if statement with a GTR/LSS numerical comparison operands.</p>
  
  <p>My code looks something like this:</p>
  
  <pre><code>@echo off
  cmd /c
  
  SETLOCAL ENABLEEXPENSIONS
  X: ...
  
  IF myVal LSS 0 (
     ECHO Error!
     GOTO X
  ) ELSE IF myVal GTR 9 (
     ECHO Error!
     GOTO X
  )
  ...
  SETLOCAL DISABLEEXPENSIONS
  </code></pre>
  
  <p>Problem is no matter what I input in myVal the error part is  always displayed and I'm stuck in an endless loop.</p>
  
  <p>Is there a problem with my syntax?
  Is it a Windows problem maybe?</p>