Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
GATHER FROM ArrayName MEMO bug
Message
De
03/08/2000 17:09:50
 
 
À
03/08/2000 16:43:22
Paul Mender
Mender Software Development
Edgewater, Colorado, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00400647
Message ID:
00400727
Vues:
18
Right. Because it's expecting all the values from one field to be in one element.
If you try to get the value of an array by simply accessing the array like any other variable, you only the first element of the array.
dimension lax(2)
lax[1] = "One"
lax[2] = "Two"
? lax
** output is "One"
Which is what happens when you GATHER from an array created by ALINES()
e.g., the gather and replace here do the same thing - give you the first element only:
alines(lax, memofield)
gather fields memofield from lax memo
replace memofield with lax
likewise, they do the same thing here - this time, they give you the whole field:
dime lax(1)
lax[1] = alltrim(memofield)
gather fields memofield from lax memo
replace memofield with lax
because the first element has the value right out of the memo field, which includes the carriage returns
So SCATTER TO is basically a shortcut for
dimension ladata(fcount(),1)
for ji = 1 to fcount()
  ladata[ji,1] = eval(field(ji))
endfor
Insanity: Doing the same thing over and over and expecting different results.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform