Hi all
I am back!
I just did a tutorial to recap my mind and make sure its all digging in. I read a tutorail over going ifs, whiles, arrays so forth.
I got this code from the tutorial and i edited some and mess with it.
What confuses me is the x% = x% + 1
Now that I think adds 1 to x value each time...
But What i have learnt from past that should only add 1... to the 120.
Your understand what I mean below looking at the code.
I learnt doing something like
a = 10
a=a+1
print a
will print 11....
Now why the code below adds 1 for it to move or someting
Someone explain plz:
THanks
luv
Wazy!
I am back!
I just did a tutorial to recap my mind and make sure its all digging in. I read a tutorail over going ifs, whiles, arrays so forth.
I got this code from the tutorial and i edited some and mess with it.
What confuses me is the x% = x% + 1
Now that I think adds 1 to x value each time...
But What i have learnt from past that should only add 1... to the 120.
Your understand what I mean below looking at the code.
I learnt doing something like
a = 10
a=a+1
print a
will print 11....
Now why the code below adds 1 for it to move or someting
Someone explain plz:
Graphics 800, 600 ; declare a global varible to keep track of our X position of our text Global x% = 120 ; declare a global varible for our Y positon Global y% = 120 ; keep doing this pieace till the user press ESC While Not KeyHit(1) ; clear the screen Cls ; print the text at our current X, U locations Text x%,y%, "Hello World" x% = x% + 1 ; add 1 to current value of x% ;Check to see if the value in X is greater than 800 (which is our screen resoulution) If x% > 800 x% = -120 ;it is greater so reset the value EndIf Delay 3 ;Tell BB to delay for 3 milliseconds Wend End ;Give control back to windows
THanks
luv
Wazy!