Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing object array
Message
From
30/04/2019 15:46:43
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Passing object array
Miscellaneous
Thread ID:
01668317
Message ID:
01668317
Views:
88
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
Next
Reply
Map
View

Click here to load this message in the networking platform