Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing Form's Array property as function parameter
Message
De
22/09/2000 18:17:23
 
 
À
22/09/2000 17:51:47
Kam Lee
SUNY-Health Science Center
Brooklyn, New York, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00420097
Message ID:
00420107
Vues:
22
>Hi all,
>
>I have a problem passing a form's array proprty in a function which
>is external to the Form. The function does not see it as an array.
>The way I passed it is like this:
>=Fctname(num1,thisform.arrayprop1)
>I could not add @ sign before the array property and it would give me
>an syntax error.
>Instead, I needed to create an array variable first and do the
>following in order to get what needs to be done:
>Dimension laTempArray[4]
>=Fctname(num1,@laTempArray)
>ACOPY(laTempArray,thisform.arrayprop1)
>Is it a known problem for VFP5? Or Is there something I have done
>incorrectly ?
>Any idea?
>
>Thanks.
>
>Kam.

Can't do it in VFP 6 either.
However, in either you can pass a reference to the form instead and use the array that way. e.g.,
** call the function
=fctname(num1, thisform)

** in the function
function fctname(tnnum1, toform)
** blah, blah, blah
  toform.arrayprop1[1]="hello"
  toform.arrayprop1[2]="world"
endfunc
Insanity: Doing the same thing over and over and expecting different results.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform