Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Confused on adding rows to array
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00222644
Message ID:
00222649
Views:
17
>I am trying to add a row to my current array and I keep getting 'function argument value, type, or count invalid' error message. Here is the code I am using:
>
>dimension a__values(1,7)
>
>for aa = 1 to lcnt
> a__values(aa, 4) = mk_approp
> dimension a__values(alen(a__values, aa) + 1, alen(a__values, 7))
>endfor
>
>
>How do I add a row each I loop through the 'for loop'. Help appreciated
>
Hi nick,

Use ALEN(a_values, 1) to determine the total number of rows, and ALEN(a_values, 2) for the number of columns. If, however, the array is dimensioned with only row values (i.e. DIMENSION a_values[7], ALEN(a_values, 2) will return 0, even though DIMENSION a_values[7, 1] yields the same total number of elements. In the latter case ALEN(a_values, 2) returns 1.
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform