Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Array by reference to a PRG
Message
From
26/09/2004 09:54:34
Mike Yearwood
Toronto, Ontario, Canada
 
 
To
25/09/2004 22:04:26
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00946047
Message ID:
00946086
Views:
16
Hi João

You can create an object with an array property. Connect this object to your form. Then you can pass this object to the prg.

**************************************************
*-- Form: form1 (c:\dev\sd\junk5.scx)
*-- ParentClass: form
*-- BaseClass: form
*-- Time Stamp: 09/26/04 09:51:10 AM
*
DEFINE CLASS form1 AS form


DoCreate = .T.
Caption = "Form1"
Name = "Form1"


PROCEDURE Init
THISFORM.AddProperty("ioFields",CREATEOBJECT("Custom"))
THISFORM.ioFields.AddProperty("iaFieldsName[1]")

USE YOURTABLE
AFIELDS(THISFORM.ioFields.iaFieldsName)

DO JUNK5 WITH THISFORM.ioFields
ENDPROC


ENDDEFINE
*
*-- EndDefine: form1
**************************************************

*JUNK5.PRG
LPARAMETERS m.toFields
LOCAL m.lnI
WITH m.toFields
FOR m.lnI = 1 TO ALEN(.iaFieldsName,1)
?.iaFieldsName[m.lnI,1]
ENDFOR
ENDWITH


>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
Previous
Reply
Map
View

Click here to load this message in the networking platform