Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Array by reference to a PRG
Message
De
25/09/2004 22:08:42
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
25/09/2004 22:04:26
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00946047
Message ID:
00946049
Vues:
18
>Hi all,
>
>I have an Array, in my form property like aFieldsName[1,0], i fill it with ALINES with an expression "joao,carlos,jose", now i need to pass it by reference to a prg, like MyTest("Test",myArray).
>
>How can i do that?
>
>João Batista

I understand that you can't really pass an array property directly. You have two options:

  • Copy it to an array first, and pass this one by reference.
  • Pass the form itself as a parameter:
    * In the form:
    do MyTest with ThisForm.
    
    * In MyTest:
    lparameters loCallingForm
    for i = 1 to alen(loCallingForm.MyArray)
      ...
    Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
  • Précédent
    Suivant
    Répondre
    Fil
    Voir

    Click here to load this message in the networking platform