I have an array x(?). I don't know the dimension of the array before hand. While I am going through a loop I know the size.
say
do i=1, n
z = f()
if z > 0 then
x(?) = z
end if
end do
I want to start x(dimension) = 1
increase every time by 1
like
j=0
do i=1, n
z = f()
if z > 0 then
j = j+1
Re dimenion x by j
x(?) = z
end if
end do
Can any body help me how I can do this?
say
do i=1, n
z = f()
if z > 0 then
x(?) = z
end if
end do
I want to start x(dimension) = 1
increase every time by 1
like
j=0
do i=1, n
z = f()
if z > 0 then
j = j+1
Re dimenion x by j
x(?) = z
end if
end do
Can any body help me how I can do this?