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:
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00955565
Message ID:
00955569
Views:
18
I think you answered your own question. Arrays in VFP are actually one dimensional...it does some tricks to make them seem two dimensions.

>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
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform