>Hi Hilmar,
>
>Yes I would to store all my procedures in findart.prg. Then when I need them I will call them and do whatever.
>
>In this instance when my form runs I want to call the procedure then show the values from the variables in my form controls text1....text2.
>
>thanks
If I understand correctly, you want to call a procedure, return several values from the procedure, and have these values change form properties.
A procedure (or function) can return only one value.
One way to do what you want to do is to pass several values by reference:
do MyProc with @par1, @par2 ...
Another method is to pass a single form object as a parameter:
do MyProc with ThisForm
lparameters toCallingForm
...
toCallingForm.Property1 = Value1
...
toCallingForm.SomeMethod()
...
toCallingForm.Label1.Caption = "Some Value"
I don't especially recommend the last line, because it violates encapsulation more than the others, i.e., the called procedure has to know too much about the internal details of how the form is set up.
Yet another method is to return a single value, made up of several pieces:
return "5;10;15"
And separate the pieces in the calling form.
I hope that one of these alternatives helps you.
Regards,
Hilmar.
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)