I'd like to create the variable offsetX
, where X
is some number. Right now, I use:
new-variable -name offset$i
where $i
is an integer. However, what I really want is offset($i-1)
. How would I change the syntax of the above statement to accomplish this?
My latest attempt was:
new-variable -name offset+"[int]$i-1"
which didn't result in an error being thrown, but still doesn't accomplish my goal.