Information générale
Catégorie:
Codage, syntaxe et commandes
Apparently, VFP expects the destination array to be large enough to receive the source array. The help file doesn't say anything about expanding the size of the destination array. FWIW, FP2.6 exhibits this same behavior.
Dan
>When I try this:
>
>dimension laarray(9)
>dimension laarray2(3)
>
>acopy(laarray,larray2)
>
>it fails with the error: subscript is outside defined range.
>I ASSUMED this was because laarray has more elements than laarray2 and VFP wasnt resizing laarray2 to compensate for the additional elements.
>
>However, I try this:
>
>dimension laarray(9)
>dimension laarray2(1)
>
>acopy(laarray,larray2)
>
>and now the two arrays are identical. VFP increased the size of laarray2 to accomodate for the additional elements.
>
>Anyone know why this is??
>
>Jon
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement