Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Help: i need help to figure out arrays
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Unreal_Origin




PostPosted: 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
Sponsor
sponsor
Genesis




PostPosted: 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




PostPosted: Sun Sep 26, 2004 12:15 am   Post subject: (No subject)

mmm.... learn arrays here
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Andy




PostPosted: 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




PostPosted: Sun Sep 26, 2004 9:10 pm   Post subject: (No subject)

thats exactly why you got no moderation powers in turing Wink
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Unreal_Origin




PostPosted: 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




PostPosted: 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




PostPosted: 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
Sponsor
sponsor
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 8 Posts ]
Jump to:   


Style:  
Search: