Posts: 21
Threads: 5
Joined: Apr 2007
I am currently running the 2.2 version of QM and when i try to "out" it isn't working... This is what I have.
top
int+ z
z+1
out z
if z=5
,end
else
,goto top
why would this not be working for me?
Posts: 1,769
Threads: 410
Joined: Feb 2003
i don't know; it works perfectly for me.
1
2
3
4
5
you can also do this
int+ z
z+1
rep 5
,out z
,z+1
Posts: 31
Threads: 13
Joined: Jan 2007
It works, but ends up in an infinite loop if you run it twice. The int+ is within the loop. The rep loop is infinite (pun intended) better.
Greatings.
Posts: 1,769
Threads: 410
Joined: Feb 2003
the "+" behind int makes it global which means when the macro ends the value stays available for other macros or itself when run again. so when you run it twice it starts with the value of '5'. if you take the '+' off, it will recreate the variable each time it runs and destroy it when it ends.