echo off
set /a a=0
:start
if %a% LEQ 21(
echo test
set /a a=%a%+1
goto start
)
I don’t get it…
I only get a Syntax-error when the loop starts.
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.
You are missing a space between
21and(which will make it compare the number in the loop to21(, also breaking theifstatement, the latter being why you are getting a syntax error.Add a space and it works fine.