hi all.
i am new to foxpro programming.
I am not sure that this is the best place for my question but i am not able
to find "working" newsgroup and/or forum about foxpro (btw, any hint
appreciated) .

my problem: I have a form defined procedure and would like to call it and
receive 2 parameters back.
i tried with: thisform.myproc(parm1,parm2) but it does not work (i read that
in this way the parameter are passed by value and not by ref...)
so i tried with DO thisform.myproc WITH (parm1),(parm2) ... but it does not
work...myproc is not recognised (even without thisform.)
so what can i do???
i tried with global variables and it worked but i do not want to use global
variable for this kind of stuff...but...it is not possible to define the
variable scope for the form? only for the procedure itself or global seem to
be the possibilities...

if somebody knows other resources for my problem, plese let me know.

thanks and ciao.

Re: vfp8 parameters and variable question by Eric

Eric
Mon May 09 09:18:38 CDT 2005

> i am new to foxpro programming.

Welcome to the Foxpro Online Community!

> I am not sure that this is the best place for my question but i am not
> able
> to find "working" newsgroup and/or forum about foxpro (btw, any hint
> appreciated) .

Yes it is.

> my problem: I have a form defined procedure and would like to call it and
> receive 2 parameters back.
> i tried with: thisform.myproc(parm1,parm2) but it does not work (i read
> that
> in this way the parameter are passed by value and not by ref...)
> so i tried with DO thisform.myproc WITH (parm1),(parm2) ... but it does
> not
> work...myproc is not recognised (even without thisform.)
> so what can i do???

You already answered the question: pass the values by reference.

lcVal1 = ""
lcVal2 = ""
thisform.myproc(@lcVal1, @lcVal2)
?lcVal1, lcVal2

* form method:
FUNCTION myproc
LPARAMETER tcVal1, tcVal2
tcVal1 = "1"
tcVal2 = "2"
ENDFUNC

--
Eric den Doop
www.foxite.com - The Home Of The Visual FoxPro Experts - Powered By VFP8



Re: vfp8 parameters and variable question by Anders

Anders
Mon May 09 09:18:26 CDT 2005

Thisform.myproc(@parm1, @parm2)
-Anders

"ilkaos" <12wre12wq2@katamail.it> wrote in message
news:427f6fbe$1_1@newsgate.x-privat.org...
> hi all.
> i am new to foxpro programming.
> I am not sure that this is the best place for my question but i am not
able
> to find "working" newsgroup and/or forum about foxpro (btw, any hint
> appreciated) .
>
> my problem: I have a form defined procedure and would like to call it and
> receive 2 parameters back.
> i tried with: thisform.myproc(parm1,parm2) but it does not work (i read
that
> in this way the parameter are passed by value and not by ref...)
> so i tried with DO thisform.myproc WITH (parm1),(parm2) ... but it does
not
> work...myproc is not recognised (even without thisform.)
> so what can i do???
> i tried with global variables and it worked but i do not want to use
global
> variable for this kind of stuff...but...it is not possible to define the
> variable scope for the form? only for the procedure itself or global seem
to
> be the possibilities...
>
> if somebody knows other resources for my problem, plese let me know.
>
> thanks and ciao.
>
>
>
>
>


Re: vfp8 parameters and variable question by mspratt

mspratt
Mon May 09 09:31:26 CDT 2005

Along with what Eric wrote it is also common th use custom form
properties. ie.
thisform.lcVal1 = ""
thisform.lcVal2 = ""

Regards,

Mike


On Mon, 9 May 2005 16:09:14 +0200, "ilkaos" <12wre12wq2@katamail.it>
wrote:

>hi all.
>i am new to foxpro programming.
>I am not sure that this is the best place for my question but i am not able
>to find "working" newsgroup and/or forum about foxpro (btw, any hint
>appreciated) .
>
>my problem: I have a form defined procedure and would like to call it and
>receive 2 parameters back.
>i tried with: thisform.myproc(parm1,parm2) but it does not work (i read that
>in this way the parameter are passed by value and not by ref...)
>so i tried with DO thisform.myproc WITH (parm1),(parm2) ... but it does not
>work...myproc is not recognised (even without thisform.)
>so what can i do???
>i tried with global variables and it worked but i do not want to use global
>variable for this kind of stuff...but...it is not possible to define the
>variable scope for the form? only for the procedure itself or global seem to
>be the possibilities...
>
>if somebody knows other resources for my problem, plese let me know.
>
>thanks and ciao.
>
>
>
>


Re: vfp8 parameters and variable question by ilkaos

ilkaos
Mon May 09 10:32:28 CDT 2005


> hi all.
> i am new to foxpro programming.

thanks all of you for your kind answers!
i will try what you suggest.

p.s.
many questions to follow ;-)