>Hi,
>
>I have a 2 dimensional array that holds information about current forms. One of the columns holds an object reference to the form.
>
>I am trying to do an ascan to search for an object reference and get an "Operator/Operand type mismatch" error.
>
>The code is like this - I call a procedure oPos.releaseform(thisform)
>
>and in oPos.releaseform i have:
>
>lparameters toform
>
>ascan(this.yaforms,toform)
>
>Thanks for any help,
>Paul
lparameters toForm
lcTempName = toForm.Name
toForm.Name = "xxxx"
for ix = 1 to alen(this.yaforms,1)
if compobj(toForm, yaforms[ix,1])
toForm.NAme = lcTempName
return ix
endif
endfor
toForm.NAme = lcTempName
return 0
In VFP6 you can directly use "=" operator instead of compobj.
Cetin