>Hi
>How and where can i declare a variable to be visible any where in my form
>In clipper we use to declare it Private in the top of the main prg
>But how can i do the same in a form I want to declare an array an passe it to a function by reference. the function redimension my array and when it return to my form i want to see my array any where in the form.
>
A Form is an object; a parameter passed to a form would be visible in the Init event of the form. If you want the array to remain present and visible, it needs to be copied to a member array, and then have the member array returned on exit from the form - this can be a complex situation, especially with a non-model form.
An alternative, and IMO, better approach to the solution is to create the array as a member arry of an object whose reference is passed to the form at form creation. The passed reference is saved to a member property of the form. THe array is then referenced through the saved object ref; any changes made are made to the member array of the parameter object, so changes persist beyond the life of the form, and are reflected in the original object whose reference was passed.
>
>Benoit