home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.msdos.batch.nt      Fun with Windows NT batch files      68,980 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 68,758 of 68,980   
   Tom Del Rosso to All   
   magnitude comparison of numbers and lett   
   12 Mar 24 23:52:24   
   
   From: fizzbintuesday@that-google-mail-domain.com   
      
   I want to know if a variable equals a number, with no letters in it.   
      
   I know you can check with FOR /F "DELIMS=0123456789" but it looks like a   
   simpler way is just to test like so:   
      
   if A gtr 1000 echo That's a letter   
      
   or   
      
   if 4A gtr 1000 echo That contains a letter   
      
   This assumes that I know what the highest possible number will be, so if   
   the first value is a number it will always be less.   
      
   Is there a problem in doing this?   
      
      
   --   
   Defund the Thought Police   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca