PDA

View Full Version : passing array (or pointer to it) from procedure back to calling program



Guest.Visitor
01-03-2003, 05:04 AM
No need to complicate things by using pointers. Declare the array in the calling program, and pass that array to the procedure as a reference parameter. Cheers! Hans

Absolutely_Nobody
01-03-2003, 05:04 AM
I have the need to create a procedure that will be called to populate an array. I need to be able to reference to arry in the calling program. Would the best way to do this to be to pass a pointer back to the calling program to resolve the address of the array populated in the procedure ? I have not used pointers before. Can someone give me a good example ? Prototype, pointer variable, etc. ?