Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP *bug*
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
VFP *bug*
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
00955565
Message ID:
00955565
Vues:
52
What would be the point in VFP allowing this:
dimension TestArray(2)
TestArray(1) = "ELEMENT A"
TestArray(2) = "ELEMENT B"

? TestArray(1, 1)
? TestArray(2, 1)
? TestArray(3, 1)
? TestArray(4, 1)
It prints:
ELEMENT A
ELEMENT A
ELEMENT A
ELEMENT A
I just ran across it while testing and debugging some code and I was getting strange results. It took me a minute or two to realize I was refering to a one dimensional array with two dimensional syntax because in this code I'm also working with some two dimensional arrays, but I was a little surprised when I found that I could refer to a row that doesn't exist (similar to the sample above). Arrrggh. This would cause an error in other languages.

Russell Campbell
eCost.com continues to rip people off
Check their rating at ResellerRatings.com
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform