Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Returning Values as an Array

Status
Not open for further replies.

Z1

Programmer
May 8, 2000
14
US
Hello,<br><br>I am trying to pass parameter to a function and wants the value back as an array. Is it possible? <br><br>Here below are codes(partly). <br>Dime l_aParentField(99)<br>l_cField = &quot;MATERIALC&quot;<br>Stor Get_ParentField(l_cField) to l_aParentField<br><br>Function Get_ParentField(l_cField)<br>Local FieldName , FileName ,ParentFieldName(99)<br>FieldName = l_cField<br>do case<br>&nbsp;&nbsp;&nbsp;Case FieldName = &quot;MATERIALC&quot;<br> ParentFieldName(1) = &quot;MATERIALCI&quot; <br> ParentFieldName(2) = &quot;MATERIALCO&quot; <br>Endcase<br>Return(ParentFieldName)<br><br><br>Thanks<br>
 
Hi Z1,<br><br>&nbsp;one solution would be similar to that of the ADIR() function. Pass the array by reference.<br><br>call it like this:<br>Get_ParentField(l_cField, @l_aParentField)<br><br>Define function like this:<br>Function Get_ParentField(l_cField,l_aParentField)<br><br>Good Luck,<br>HTH<br><br>Jon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top