Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Array property as a referenced parameter to a function
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00047926
Message ID:
00048162
Views:
38
>>>Yes, but in the initial message Jorge ask for a way to reference an
>>>array without copy it...
>>
>>That's exactly what one of the techniques does, and it's faster than macro substitution. Note:
>>
>>>>2. Use the EVAL() function to access the Nth element of oMyObject.aMyArray by saying:
>>>>cThisElement=cMyArrayRef + "(N)"
>>>>Now you can change the value of N as often as you like and resolve the value of the Nth element by simply asking for Eval(cThisElement)
>>
>>:)
>Thanks you guys (Gérald & Mark) for your advise, I'm migrating my applications to VFP 5.0, I guess I have to rewrite my old array functions so now they can handle array properties.
>
>Have any of you tested what could be faster, either copy the array to a temp array or do the macro substitution as Gérald proposes?

I don't know, if you have only some little things to do in your
procedure, it's a question of programming style.

In the other hand, if you have some big process to handle, it could
be a good idea to test both ways to make an advised choice...

:)
If we exchange an apple, we both get an apple.
But if we exchange an idea, we both get 2 ideas, cool...


Gérald Santerre
Independant programmer - internet or intranet stuff - always looking for contracts big or small :)
http://www.siteintranet.qc.ca
Previous
Reply
Map
View

Click here to load this message in the networking platform