Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing property arrays by reference
Message
De
19/07/2001 17:59:09
 
 
À
19/07/2001 17:18:40
Del Despain
Colorado Plateau Associates
Hurricane, Utah, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00532698
Message ID:
00532888
Vues:
11
>>You have to ACOPY() it out first.
>>e.g.
>>
>>
>>Dimension laPassThisArray(ALen(oForm.aArray,1), ALen(oForm.Array,2))
>>ACopy(oForm.aArray, laPassThisArray)
>>dothis(@laPassThisArray)
>>You should add some sort of check for single dimension arrays vs. two dimensional arrays, but you get the idea.
>
>That's what I was doing, but I thought maybe there was some direct way of doing it that I was missing.
>
>Thanks!
>
>Del

I forgot to mention that you can also pass an object reference to the form, but you would have to re-code the "dothis" function to accept the object.
Then you can refer to the object.array, e.g.
dothis(oForm)
** dothis()
function dothis(toForm)
  toForm.array(1,1) = "hello"
  ** etc...
endfunc
Insanity: Doing the same thing over and over and expecting different results.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform