Subject Re: Control passing back and fro in a form sub routine
From Milind Nighojkar <milinigh@yahoo.com>
Date Wed, 26 Jul 2023 18:38:56 -0400
Newsgroups dbase.getting-started

Good Evening Akshat bhai,
Thanks for the resolution
Defining mform = form suggestion worked....
This exactly I was looking for.....I had defined earlier but was ignorant about the syntax.....

Just to share...My subroutine gets into lot of iterations so when passing the value to form for information purpose increases the execution time enormously....

Akshat Kapoor Wrote:

> Good Evening Mervyn,
>
> >> The value returned by square.prg will be displayed. I am posting code
> >> BUT it may cause complications due to use of Public variables.
> >>
> >>      Public mform
> >>      mform = form
> >> What happens to form after the end of the form is untested. It will be
> >> released from memory or not I cannot say.
> >
> > The use of Public variables, and user-defined properties of the _app
> > object which are their counterpart in OOP, has it's place but one should
> > really only use them as a last resort when there is no other way.
>
> I avoid public variables like I would avoid Covid. My personal
> preference is custom properties of form but there are situations where
> this cannot be avoided.
>
> I have lost touch (all thanks to reduced programming time) but there
> used to 2 methods of passing value.
>
> One of them used to be reference. You change the value in function and
> the host value is also changed.
>
> In C it used to be something like adding & to the memory variable and
> the memory address would be passed.
>
> I do not remember using something similar in dbase.
>
> Regards
> Akshat