Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing object array
Message
De
30/04/2019 15:46:43
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Passing object array
Divers
Thread ID:
01668317
Message ID:
01668317
Vues:
89
Is there a way to pass an object array by reference?
lo = CREATEOBJECT("_c")
lo.process()

DEFINE CLASS _c AS Custom
    aArray[1] = .f.
    
    PROCEDURE Process
    LOCAL laArray
        DIMENSION laArray[1]
SET STEP ON
        this.update_array(@laArray)
        this.update_array(@this.aArray)
    ENDPROC

    PROCEDURE update_array
    LPARAMETERS taArray
    EXTERNAL ARRAY taArray
        taArray[1] = "test"
    ENDPROC
ENDDEFINE
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform