Author |
Message |
Unreal_Origin

|
Posted: 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 |
|
|
|
|
 |
Sponsor Sponsor

|
|
 |
Genesis

|
Posted: Fri Sep 24, 2004 10:12 pm Post subject: (No 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. |
|
|
|
|
 |
Tony

|
|
|
|
 |
Andy
|
Posted: Sun Sep 26, 2004 6:15 pm Post subject: (No subject) |
|
|
man this is so biased... dammit why dont i turing powers? then i'd delete tony's tutorial lol |
|
|
|
|
 |
Tony

|
|
|
|
 |
Unreal_Origin

|
Posted: 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 |
|
|
|
|
 |
Unreal_Origin

|
Posted: Tue Sep 28, 2004 8:33 pm Post subject: (No subject) |
|
|
nvm i am an idoit i left it : not := thx for your help |
|
|
|
|
 |
Genesis

|
Posted: Tue Sep 28, 2004 8:38 pm Post subject: (No 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. |
|
|
|
|
 |
Sponsor Sponsor

|
|
 |
|