Author |
Message |
ashan
|
Posted: 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 |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Andy
|
Posted: 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
|
Posted: Wed Jun 08, 2005 7:35 pm Post subject: (No subject) |
|
|
thx |
|
|
|
|
|
ashan
|
Posted: 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
|
Posted: 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. |
|
|
|
|
|
|