Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing a 2-dimensional array as a parameter
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00535115
Message ID:
00535136
Vues:
15
This message has been marked as a message which has helped to the initial question of the thread.
Justin,

This should work much faster for you:

SELECT(ThisForm.cUtility.grdBoms.cGridList.RecordSource)

local laBomsAffected[1]
COPY TO ARRAY laBomsAffected

COPY TO will dimension the array big enough and copy every row. You also have to make sure you won't exceed the 65,500 element size limit of an array.


>I know similar questions have been asked numerous times here, but none of the threads I have read have been able to help me, as they require the array is being passed to a form.
>
>What I am trying to do is pass a 2-dimensional array from a form-based class to an event-based class. I am using VFP 6 and the latest Mere Mortals version:
>
>SELECT(ThisForm.cUtility.grdBoms.cGridList.RecordSource)
>
>lnRecNum = RECCOUNT()
>
>DIMENSION laBomsAffected(lnRecNum,5)
>
>*loops through the recordsource of the grid by row
>SCAN
>
> COPY TO ARRAY laBomsAffected
>
>ENDSCAN
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform