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

Username:   Password: 
 RegisterRegister   
 Need Help with Procedure and Arrays
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
ashan




PostPosted: Wed Jun 08, 2005 7:24 pm   Post subject: Need Help with Procedure and Arrays

does any one know how return a value that is in a procedure?
and how to find the size of the array?

thx Crying or Very sad
Sponsor
Sponsor
Sponsor
sponsor
Andy




PostPosted: Wed Jun 08, 2005 7:29 pm   Post subject: (No subject)

to find the size of an array simply use upper and lower
code:

var list:array 1..5 of int
put upper(list)-lower(list)+1


if your array starts at 1 then simply output upper(list)

as for a procedure that returns a value, that would be called a function.. look it up in the tutorials section
ashan




PostPosted: Wed Jun 08, 2005 7:35 pm   Post subject: (No subject)

thx
ashan




PostPosted: Wed Jun 08, 2005 10:28 pm   Post subject: (No subject)

I want to use a array that is in a procedure, in another procedure? i don't want to use the whole procedure, only the two arrays inside. i want them to display in another procedure.

This how my program suppose to work-
first i get input student names and marks separately through 2 arrays. then after that it goes to the main window and when i click a button it goes to another procedure and display the names and marks students got.
I got the buttons workin, but i can't get the results from the arrays.
can someone help me with this?

thx
Malazan




PostPosted: Thu Jun 09, 2005 10:20 am   Post subject: (No subject)

You can always use records. Check out Tutorials and read up on it, I think it'll help you out.
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  [ 5 Posts ]
Jump to:   


Style:  
Search: