In DOS/Batch,
if 08 lss 1 echo true
echoes “true”. The same applies to 09. Both 08 and 09 are less than 1.
However,
if 07 lss 1 echo true
does not echo anything. 01 to 07 are not less than 1.
Why? What is special about 08 and 09?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Typically, a leading
0indicates you’d like the number to be parsed in octal. I’d expect08or09to actually be an error condition; perhaps the batch language does not have a good mechanism to signify that the input was incorrect?