Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Array by reference to a PRG
Message
From
25/09/2004 22:08:42
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
25/09/2004 22:04:26
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00946047
Message ID:
00946049
Views:
19
>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)
  • Previous
    Next
    Reply
    Map
    View

    Click here to load this message in the networking platform