Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing a 2-dimensional array as a parameter
Message
De
25/07/2001 12:41:08
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00535115
Message ID:
00535133
Vues:
15
This message has been marked as a message which has helped to the initial question of the thread.
>Hello,
>
>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
>
>* Create event object.
>loEventObj = CreateObject('CompReplaceAllBomEvent', tnOrderOpt, ;
>vp_cOrigSkuNum, vp_cNewSkuNum, laBomsAffected)
>
>Any help would be very much appreciated as this has become one of those torturous bits of code that cause premature hair loss for me.
>
>TIA!

Justin,
First 'copy to array' by default doesn't just copy current record, IOW default scope is all records meaning you're sending same array reccount() times.
Next pass by reference (@laBomsAffected).
If it's MTDLL COM object set array passing style with ComArray.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform