Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ARRAY() command in Visual Basic
Message
 
 
À
11/06/2001 16:37:40
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00518091
Message ID:
00518291
Vues:
11
>I am converting a Visual Basic routine to VFP. I need to send four parameters to an object oriented application. The Visual Basic routine uses the ARRAY() command like this:
>
>myParams=ARRAY("0p0","0p0","18p0","18p0")
>myTFrame.GeometricBounds=myParams
>
>When I use the DIMENSION command to create a 1 dimension array, and then populate the array with the values given above, the application chokes. Is there a way in VFP to mimic the ARRAY() command in VB?
>
>Thanks in advance...
>
>John Dennis

John,
Unfortunately, no. The ARRAY() function creates a SAFEARRAY. For a defintion of what a SAFEARRAY is, check out this MSDN topic. http://msdn.microsoft.com/library/psdk/automat/chap7_9ntx.htm

IAC, VFP does not create SAFEARRAYs so you can not assign a VFP array to something that is supposed to be an array property and have it work. If there was a method that took an array as a parameter, it would work because the array would be converted to a SAFEARRAY going through the COM barrier. But that doesn't look like the case here.

AFAIK, unless there is another interface to this property (e.g. method to set it), you won't be able to use this property with VFP.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform