Computer Science Canada

Plz can some1 explain the for i: 0..maxx by 20 command 2 me

Author:  ruscutie [ Thu Oct 12, 2006 4:38 pm ]
Post subject:  Plz can some1 explain the for i: 0..maxx by 20 command 2 me

i am doing turing for the first time at school and i don't really get the for i command in graphics. like in the following program wats the use of for i

for i : 0 .. maxx by 20
drawline(maxx-i , 0, maxx, maxy - i, 16)
end for

plz explain it 2 me
thanx

Author:  Cervantes [ Thu Oct 12, 2006 5:54 pm ]
Post subject: 

Try running the following code:
code:

for i : 0 .. maxx by 20
    put i
end for

Now you'll see the values that `i' can take on. Then sub those values into your expressions for drawline and see what comes out. Look for patterns.

Author:  ruscutie [ Thu Oct 12, 2006 6:09 pm ]
Post subject: 

thanx


: