Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Arrays
Message
 
 
To
25/05/2001 11:02:57
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Re: Arrays
Miscellaneous
Thread ID:
00510432
Message ID:
00511555
Views:
15
This message has been marked as the solution to the initial question of the thread.
>but in the stub method that you provided, wouldn't the name of the array be what the ( say ) form called it. you said the method was in the main program not the form, so if I wanted to use that form in a different application I would once again need to add that stub method in the main program. right?

Yes, you would. I like to put things where they need to go. The Stub program is an alternative but I don't use it regularly. I think Craig mentioned as one way of using arrays in Reports and not getting compiler errors. Forms, Programs and Classes are different matters. We have control there so use that control.

maybe I'm confused? when you use the external method, the array would need to be defined elsewhere ( not in the form ), or in that case would it matter if there was an array called BlaBlaBla anywere else in the program? I guess that using external is just ( in this case ) a nice way of lying to the compiler, knowing that it will work even thought the compiler doesn't.

External is just a way of telling the compiler that the reference to BlahBlah(1) is not a reference to a program with a parameter passed to it. It is a reference to an array but the array was defined elsewhere (i.e. not in this method).

>
>I think I'm talking my way though this one
>
>so in main.prg:
>array Hidden[1]
>do myform with Hidden
>
>in myform init:
>lParameters notHidden
>External notHidden <- or would this need to be in the load?
>

Exactly right except you need the ARRAY keyword in the EXTERNAL command. And yes it needs to be in the Init because parameters are not received until then.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Reply
Map
View

Click here to load this message in the networking platform