1.

Solve : Var problem...?

Answer»

I'm trying to combine 2 variables together, but it's just not WORKING...
Code: [Select]set /a linenum=1
:loop
Echo PLEASE type the a line.
set /P line%linenum%=
if %line%linenum%%==STOP goto stop
set /a linenum+=1
goto loop
:stop
Echo The IF part is causing me trouble, and the end as well. The end will be easy once the IF part is solved. As you can see, my failed attempts...try CHANGING your IF to this:


if %line%%linenum%==STOP goto stop

 I think you need to ENABLEDELAYEDEXPANSION and use:

Code: [Select]if !line%linenum%!==STOP goto stop 


did I reveal how used to the OLDER DOS batch stuff I am? 

Nah, your secret is safe with us



Discussion

No Comment Found