
-----------------------------------
ruscutie
Thu Oct 12, 2006 4:38 pm

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

-----------------------------------
Cervantes
Thu Oct 12, 2006 5:54 pm


-----------------------------------
Try running the following 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.

-----------------------------------
ruscutie
Thu Oct 12, 2006 6:09 pm


-----------------------------------
thanx
