I've been looking into finding a way to loop through variables via a counter:
var v1,v2,v3,v4,v,i:integer;
begin
v1:=1;
v2:=2;
v3:=3;
v4:=4;
repeat
writeln(v<i>);
i:=i+1;
until (i=4)
end.
So i want to be able to print all of my variables v1 -> v6 via a loop. Is there any way to assign var v to be of type int that takes the place of other vars? (to allow my adding of numbers at the end of the variable to call another variable)
Thank for any help i get even if it is a no. Not that it will stop me from trying.