Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Array gotcha - don't imagine a dimension
Message
De
17/12/2009 08:43:20
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Array gotcha - don't imagine a dimension
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01439557
Message ID:
01439557
Vues:
169
Just run into a... I wouldn't even call it a bug, it's a gotcha.

I was messing with some code where I was supposed to have some two column array, but as it went I simplified it and the array came out single column, so it became one-dimensional. There were a few calls referring to the 1st column... but it always returns the first row.

Here's how to reproduce:
*-- TEXT BLOCK BEGIN
TEXT TO c NOSHOW TEXTMERGE
one
two
three
four
ENDTEXT
*-- TEXT BLOCK END
alines(aa, c)
for i=1 to 4
    ? aa(i), aa(i,1)
endfor
So just DON'T use the 2nd dimension in a single dimension array.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform