I'm trying to efficiently name variables a1 through a9 with !%f%! through !%q%!.
I tried creating a for loop to complete this:
set w=0
for %%K in (f g h i k l m o q) do (
set /a w+=1
set /a b%w%=%!%%K!%
set /a a%w%=!b%w%!%%13
)
The error is that there is a missing operator, so I'm assuming that the parenthesis and exclamation marks are being misread. How would I go about fixing this problem?
TL;DR
Make:
set /a a1=!%f%!%%13
...
set /a a9=!%q%!%%13
...more efficient.
To clarify, %f% is equal to say 4D and %4D% is equal to 9.
I need the modulus of 9 and 13 as the a1.
set /a w=w+1- you should doset /a w+=1.