for i command in graphics- help needed-urgent
Author |
Message |
ruscutie
|
Posted: Thu Oct 12, 2006 6:13 pm Post subject: for i command in graphics- help needed-urgent |
|
|
for i:0..maxx by 20
drawline(0,maxy-i,i,0,16)
end for
in the above program i don't really get the usage of for i and when do we use for i and how do we use it.... plz help me its urgent |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Ultrahex
|
Posted: Thu Oct 12, 2006 6:31 pm Post subject: (No subject) |
|
|
There is a Tutorial On This Stuff, Im Not Gonna Link cause im doing other work, but the main purpose of I is it increments (in this case by 20) until the max X location in the window that turing is making is reached.
So what its doing is changing the Y position dropping it by 20 each repetition, and then the other i is increasing the x value by 20 each repetition. (ugh i can't explain head hurts, Chemistry, hope that helps) |
|
|
|
|
|
[Gandalf]
|
Posted: Thu Oct 12, 2006 6:59 pm Post subject: (No subject) |
|
|
You post the exact same topic earlier, get an answer, even say "thanx", and proceed to post the same topic a few minutes later? Was it not good enough for you? Did you seriously think this topic would have any more usefulness than the other one? Did you think no one would notice your double topic posting? I suggest you not do something like this again, and read [The Rules] while you're at it. |
|
|
|
|
|
ruscutie
|
Posted: Thu Oct 12, 2006 7:19 pm Post subject: (No subject) |
|
|
thanx btw i am new over here and it would b better if u help me rather than giving comments and i didn't get it for the first time .... |
|
|
|
|
|
Tony
|
Posted: Thu Oct 12, 2006 9:14 pm Post subject: (No subject) |
|
|
ruscutie wrote: it would b better if u help me rather than giving comments
It would have been better if you were to actually contribute to the community, instead of spamming demands for basic syntax usage.
Loops, including for variable: min .. max are covered in Tutorials |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
|
ruscutie
|
Posted: Thu Oct 12, 2006 9:20 pm Post subject: (No subject) |
|
|
thanx for advise but i am new i am not a really gud programmer so i didn't get it i am doing programming for the first time... c'mon try 2 understand |
|
|
|
|
|
Cervantes
|
Posted: Thu Oct 12, 2006 9:41 pm Post subject: (No subject) |
|
|
Read the tutorial linked to in Tony's post. It will explain everything.
I'm going to lock this now, simply to force you to seek the information you need from the resources you have available, rather than spamming the Help forums. |
|
|
|
|
|
|
|