
-----------------------------------
Unreal_Origin
Fri Sep 24, 2004 10:07 pm

Help: i need help to figure out arrays
-----------------------------------
hey i need help to figure out arrays turing does explain it well inof for me so if someone can help me that would be awesome

Later, Terence

-----------------------------------
Genesis
Fri Sep 24, 2004 10:12 pm


-----------------------------------
There is a fantastic search tool on this site. If you search the Turing Tutorials section for "Arrays" you will come up with all of the Turing tutorials about arrays. And they are quite good.

If I wasn't so lazy I'd post links for you.

-----------------------------------
Tony
Sun Sep 26, 2004 12:15 am


-----------------------------------
mmm.... [url=http://www.compsci.ca/v2/viewtopic.php?t=366]learn arrays here

-----------------------------------
Andy
Sun Sep 26, 2004 6:15 pm


-----------------------------------
man this is so biased... dammit why dont i turing powers? then i'd delete tony's tutorial lol

-----------------------------------
Tony
Sun Sep 26, 2004 9:10 pm


-----------------------------------
thats exactly why you got no moderation powers in turing :wink:

-----------------------------------
Unreal_Origin
Tue Sep 28, 2004 8:31 pm

just a questiong
-----------------------------------
hey i am wondering why this doesn't work 


var stars_x: array 1..250 of int
var stars_y: array 1..250 of int
for j: 0..300
for i: 1..250
drawdot (stars_x (i),stars_y (i),175)
stars_x (i): stars_x (i)+1
stars_y (i): stars_y (i)+1
drawdot (stars_x (i),stars_y (i),yellow)
end for
end for


it is this part that it screws up at


stars_x (i): stars_x (i)+1
stars_y (i): stars_y (i)+1

since this doesn't work how do i do it

-----------------------------------
Unreal_Origin
Tue Sep 28, 2004 8:33 pm


-----------------------------------
nvm i am an idoit i left it : not := thx for your help

-----------------------------------
Genesis
Tue Sep 28, 2004 8:38 pm


-----------------------------------
I'm not sure what this program is trying to accomplish, but in this code:

stars_x (i): stars_x (i)+1
stars_y (i): stars_y (i)+1 

You're missing "=" signs. It should be:

stars_x (i):= stars_x (i)+1
stars_y (i):= stars_y (i)+1 

The next problem is that the elements of your arrays have no values. So you're gonna have to set them to something before you can add to them.

EDIT: I see you've already solved the problem. By the time I got around to hitting the submit button for this post, you must've already posted again.
