Red_eye, your code had a few faults so I corrected it and added some of my own comments (sure you don't mind
). It didn't start from the beginning when you clicked, I re-arranged the code, because when you clicked it didn't reset the num$ variable and you got a higher number printed at the beginning. I also compressed the two 'if' statements into one since they do the same thing.
rem set the number to start counting from
c=0
rem the main loop
do
rem increase the counter
c=c+1
rem change the counter into a string$ so we can tell how wide it is
num$=str$(c)
rem set the position of the number/text on the screen
set cursor x,y
rem print the number at the position specified above
print num$
rem increase the x variable based on how wide the current number is
x=x+text width(num$+" ")
rem when we get to the end of a row (the screen is 640 pixels/units wide by default), go 1 line down and start again
if x>620
x=0
y=y+20
endif
rem if we get to the bottom of the page clear the screen and start again at the top
if y>420
cls
x=0
y=0
endif
rem click or press key to restart (use the if-endif structure if you have lots of things to do)
if mouseclick()=>1 or scancode()=>1
cls
c=0
x=0
y=0
endif
rem pause for a fraction of a second
wait 0
rem end main loop
loop
Brains are for idiots.
Athelon XP 1400 Plus - Nvidia Geforce MX400 - 256mb RAM