justinmeza / lci

A LOLCODE interpreter written in C.
http://lolcode.org
GNU General Public License v3.0
780 stars 105 forks source link

Loops always create a loop-scope variable and initialize it to 0 #71

Open mjreed-wbd opened 3 years ago

mjreed-wbd commented 3 years ago

From the spec I expected to be able to count from, say, 5 to 10 like this:

I HAS A Var ITZ 5
IM IN YR Loopy UPPIN YR Var WILE DIFFRINT Var AN 10
  VISIBLE Var
IM OUTTA YR Loopy

But it starts at 0, and the outer Var is still 5 at the end. So how do I do a loop that doesn't start at 0?