Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dimension & Arrays
Message
From
13/08/1997 12:12:33
Matt Mc Donnell
Mc Donnell Software Consulting
Boston, Massachusetts, United States
 
 
To
13/08/1997 12:09:08
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00044461
Message ID:
00044466
Views:
32
>>I was wonder if anyone could help me with an array problem.
>>
>>I have a database which populates an array like follow
>>
>>DIMENSION xTemp(999,2)
>>
>>store "Hello" to xTemp(500,1) and so on.
>>
>>Now what I would lile to do is to get the value from a memory location
>>
>>thisform.lbLabel.caption = xTemp(500,1)
>>
>>This would then give me a caption that equal "Hello"
>>
>>What i get is ( program xTemp is not found )
>>
>>Thanks for any help
>>
>>James
>
>Array will be scoped for the snippet (event,method) where you issued DIMENSION, therefore if you issue thisform.lbLabel.caption = xTemp(500,1) from another snippet, you will get the error. Also (minor point) it's nicer to use xTemp[500,1].

use... PUBLIC ARRAY instead of DIMENSION, just remember to RELEASE it when you're done (prob in the form.release)

HTH

Matt
Matt McDonnell
...building a better mousetrap with moldy cheese...
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform