Computer Science Canada Passing arrays |
Author: | chrisbrown [ Sat Feb 18, 2006 5:47 pm ] |
Post subject: | Passing arrays |
I don't know if this has been addressed in this forum; I gave up serching through the 63 pages of hits the search term "passing arrays" returned. Anyways, I'm writing a football game and I need to pass a 2D array to a procedure which will then write the contents of that array to a file. The I/O is no problem for me, but if anyone knows how to pass arrays please let me know. Thanks |
Author: | Cervantes [ Sat Feb 18, 2006 6:01 pm ] | ||||||||
Post subject: | |||||||||
Welcome to CompSci.ca! ![]() You can pass an array into a procedure, like this:
Of course, what if the array doesn't end at 10?
This will accept an array with a lower bounds of 1 and an upper bounds of mostly anything. A 2D array can be done like this:
Here's an example:
|
Author: | Delos [ Sat Feb 18, 2006 11:00 pm ] |
Post subject: | |
Or do you mean parse? That would entail an analysis of each element and redistribution based upon their inherent structures as per your afore setup grammatical structure... ![]() Or something like that. Listen to Cervantes. |