I've been searching through this forum, but can't seem to find anything on this. There've been examples for arrays in structures, and even dimensioning structure arrays. But how would I pass a structure array to a procedure:
Structure example
a.l
b.s
EndStructure
Dim test.example(3)
test(1)\a = 123
test(2)\b = "A B C"
sample(test())
End
Procedure sample(pass.example())
Debug pass(1)\a
Debug pass(2)\b
pass(2)\b = "D E F"
EndProcedure
This is just to illustrate the intended operation, and obviously doesn't work. Can anyone help please?
@netmaestro: Smply brilliant! You got it absolutely right. Thank you!
I tried variations of using the * and @ operators, and also using the Array keyword, but somehow didn't seem to get the right combination. Not very scientific, but that's the way I code.
Thanks to you too tinman. I didn't get a chance to try your code before you yanked it out, but I'm sure it was brilliant.
@coder14
Probably Procedure sample(Array pass.example(1)) confused you, at least for me it always was. Just take a look at the help for Procedure and Dim...
If any of you native English speakers have any suggestions for the above text, please let me know (via PM). Thanks!
c4s wrote:@coder14
Probably Procedure sample(Array pass.example(1)) confused you, at least for me it always was. Just take a look at the help for Procedure and Dim...
WHOA! How did I miss that? I poured through the help file like crazy and I still missed that.
I probably need a break. Thanks for the heads up - you guys are great.