because it will be useful but i don't know how
this is an Example:
function getID()
write("Floor #" .. count .. "computer ID: ")
input=read()
floorID=(input+0)
return floorID
end
write("Floors: ")
input=read()
floors=(input+0)
count=0
if not count==floors then
count=count+1
F1=getID()
end
if not count==floors then
count=count+1
F2=getID()
end
if not count==floors then
count=count+1
F3=getID()
end
if not count==floors then
count=count+1
F4=getID()
end
if not count==floors then
count=count+1
F5=getID()
end
if not count==floors then
count=count+1
F6=getID()
end
if not count==floors then
count=count+1
F7=getID()
end
if not count==floors then
count=count+1
F8=getID()
end
if not count==floors then
count=count+1
F9=getID()
end
if not count==floors then
count=count+1
F10=getID()
end
if not count==floors then
count=count+1
F11=getID()
end
if not count==floors then
count=count+1
F12=getID()
end
if not count==floors then
count=count+1
F13=getID()
end
if not count==floors then
count=count+1
F14=getID()
end
if not count==floors then
count=count+1
F15=getID()
end
this is very long and it is a waste of timebut if the variable name was a string it will be:
function getID()
write("Floor #" .. count .. "computer ID: ")
input=read()
floorID=(input+0)
return floorID
end
write("Floors: ")
input=read()
floors=(input+0)
count=0
for i=1,15 do
if not count==floors then
count=count+1
("F" .. i)=getID()
end
end
very short, isn't it?but the variable name is not a string so my question is
Is there any way to make the variable name variable?
I hope my question was understandable












