Computer Science Canada

Help: i need help to figure out arrays

Author:  Unreal_Origin [ Fri Sep 24, 2004 10:07 pm ]
Post subject:  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

Author:  Genesis [ Fri Sep 24, 2004 10:12 pm ]
Post subject: 

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.

Author:  Tony [ Sun Sep 26, 2004 12:15 am ]
Post subject: 

mmm.... learn arrays here

Author:  Andy [ Sun Sep 26, 2004 6:15 pm ]
Post subject: 

man this is so biased... dammit why dont i turing powers? then i'd delete tony's tutorial lol

Author:  Tony [ Sun Sep 26, 2004 9:10 pm ]
Post subject: 

thats exactly why you got no moderation powers in turing Wink

Author:  Unreal_Origin [ Tue Sep 28, 2004 8:31 pm ]
Post subject:  just a questiong

hey i am wondering why this doesn't work

code:

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

code:

stars_x (i): stars_x (i)+1
stars_y (i): stars_y (i)+1

since this doesn't work how do i do it

Author:  Unreal_Origin [ Tue Sep 28, 2004 8:33 pm ]
Post subject: 

nvm i am an idoit i left it : not := thx for your help

Author:  Genesis [ Tue Sep 28, 2004 8:38 pm ]
Post subject: 

I'm not sure what this program is trying to accomplish, but in this code:

code:
stars_x (i): stars_x (i)+1
stars_y (i): stars_y (i)+1


You're missing "=" signs. It should be:

code:
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.


: