General information
Category:
Coding, syntax & commands
Title:
Can an array available in all procedures like a variable?
I create an array in my init procedure
dimension a__gen10(1,2)
as soon as I leave init procedure and go grids interactivechange() procedure to populate the grid the array definition disappears.
Is there a way to make array through all the procedure for a form like a variable? I am trying to populate the array in grid by increasing array size and inserting values as follows
*.grid.column1.text1.interactivechange()
with thisform
if .first_sw = .f.
.first_sw = .t.
.v = .v + 1
a__gen10(.v,1) = .g1.c1.t1.value
a__gen10(.v,2) = .g1.c6.t6.value
else
dimension a__gen10(alen(a__gen10, 1) + 1, alen(a__gen10, 2)) .v = .v + 1
a__gen10(.v,1) = .g1.c1.t1.value
a__gen10(.v,2) = .g1.c1.t1.value
endif
endwith
Thanks
Nick Patel
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only