>Just to show how rusty my VFP is:
>
>How should I return an array from a (modal) form. Calling line this:
DO FORM xxxx WITH SourceData TO ReturnData
I know I have to return it from the Form.Unload() but.....?
>
>FWIW I can make the array local or a property of the form - but I think it needs to be a property ?
You cannot return an array. If you do it only returns the first element of the array
As mentioned, use an object
do Form xx to tt
Unload
local obj, nElements
obj = createobject('empty')
nElements = 24
= addproperty(m.obj, 'aa[m.nElements]')
local i
for i = 1 to m.nElements
obj.aa[m.i] = m.i
endfor
=dodefault()
return m.obj
Gregory