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,757 of 68,980    |
|    R.Wieser to All    |
|    Re: magnitude comparison of numbers and     |
|    13 Mar 24 09:19:21    |
      From: address@is.invalid              Tom,              > 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?              Yes. A quick test just now shows that both of the above cause string       comparision.              And that means that any ASCII character below "0" will not be recognised as       a letter. Just try "if $ gtr 1000"              IOW, you will need an "if lower than 0 or larger than 9" check - and hope       that any non-digit characters, when hidden inside the value, will not modify       that value.              Regards,       Rudy Wieser              --- 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