Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP *bug*
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
VFP *bug*
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00955565
Message ID:
00955565
Views:
51
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
Next
Reply
Map
View

Click here to load this message in the networking platform