Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Local array won't work
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00487664
Message ID:
00487775
Views:
8
>>>>doesn't the "LOCAL ARRAY" definition do the same as "DIMENSION"?
>>>
>>>
>>>DIMENSION creates a PRIVATE array.
>>
>>Nope, not always. Consider the following:
* MyPrg1.prg
>>LOCAL a_anyarray
>>DIMENSION a_anyarray[1]
>>a_anyarray = "Hi there!"
>>DO MyPrg2
>>RETURN
>>
>>* MyPrg2.prg
>>? a_anyarray[1] && Generates "File a_anyarray.prg does not exist" error.
>>RETURN
However, take out the LOCAL statement and it is private because its scope hasn't been specified.
>
>
>Right...that's what I was saying.

I just wanted to clarify the point that DIMENSION, in and of itself, doesn't affect the scope of the variable. It seemed to me that could be derived from your post.
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform