>Clear >o = Createobject('myClass') >o2 = Createobject('otherClass') >o.PassArray(o2) >o.ToUDF() >MyUDF2(o,'myArray') >o.PrintArray() > >Function MyUdf(taArray) > Local ix > For ix=1 To 5 > taArray[m.ix,1] = taArray[m.ix,1] + taArray[m.ix,2] > ? taArray[m.ix,1],taArray[m.ix,2] > Endfor > >Function MyUDF2(toObj,tcArrayName) > a = toObj.getArrayRef(m.tcArrayName) > Local ix > For ix=1 To 5 > a[m.ix,1] = -a[m.ix,1] > ? a[m.ix,1] > Endfor > >Define Class MyClass As Session > DataSession = 2 > Dimension myArray[5,2] > > Procedure Init > Local ix > For ix=1 To 5 > This.myArray[m.ix,1] = m.ix > This.myArray[m.ix,2] = m.ix^2 > Endfor > Endproc > > Procedure PassArray(toTarget) > ref = This.getArrayRef('myArray') > toTarget.Receive(@ref) > Endproc > > Procedure ToUDF > ref = This.getArrayRef('myArray') > MyUdf(@ref) > Endproc > > Procedure PrintArray > Local ix > For ix=1 To Alen(This.myArray,1) > ? This.myArray[m.ix,1], This.myArray[m.ix,2] > Endfor > Endproc > > Procedure getArrayRef(tcArrayName) As Array > Return @This.&tcArrayName > Endproc >Enddefine > >Define Class otherClass As Session > Procedure Receive(taArray) > Local ix > For ix=1 To Alen(taArray,1) > ? taArray[m.ix,1], taArray[m.ix,2] > Endfor > Endproc >Enddefine >Cetin