Why doesn't this work in lua?
for i = 1, 100, -1 do
print('Infinite')
end
The above loop prints nothing. From what I know from conventional languages like C/C++, the above should be an infinite loop. C++ equivalent
for (int i = 1; i <= 100; i--)
cout << "Infinite";
I want to know how exactly a for loop in lua works. Isn't it the same as the C++ one given above?
Edit: I don't want to know How to make an infinite loop in lua. I am more concerned here with how a for loop in lua works?