Skip to Content
Nov 09, 2018 at 03:08 PM

Dynamic Variable names

200 Views Last edit Nov 09, 2018 at 03:08 PM 2 rev


I have in my program sixty variables which have similar names, except the last character which is incriminated. for example :

var1, var2, var3 ..... var60

I want to declare them using a loop instead of declaring each variable. using an index that increments and concatenates with the unchangeable portion of variables (var...).

Is there a way to do it ? and how?