Computer Science Canada pass arrays to modules? |
Author: | Clayton [ Mon Apr 10, 2006 6:14 pm ] |
Post subject: | pass arrays to modules? |
hey, just wondering, is it possible to pass entire arrays to a module and have that module return the array (ex. in a sorting module). if its possible could u plz let me know how thnx |
Author: | [Gandalf] [ Mon Apr 10, 2006 6:18 pm ] |
Post subject: | |
Hmm? Unless I mistake your question, of course. Modules are able to include procedures and functions which are in turn able to accept arrays as arguments. |
Author: | Clayton [ Mon Apr 10, 2006 6:20 pm ] |
Post subject: | |
but how would you pass the array from a main program to a module without splitting an array up into different pieces (ex. 1 piece of info at a time) |
Author: | [Gandalf] [ Mon Apr 10, 2006 6:26 pm ] | ||
Post subject: | |||
The same way you would pass an array to a procedure or function:
It works the same for a procedure in a module. |
Author: | Clayton [ Mon Apr 10, 2006 6:44 pm ] |
Post subject: | |
oh ok thnx alot, talk about a brain fart lol |