Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recursive "Use" statement

Status
Not open for further replies.

ArcaneAnomaly

Programmer
May 19, 2015
1
US
I know that when you use the "Use" statement, the program unit with the "use" statement has access to the global variables and subprograms (functions and subroutines) contained in the program unit named after the "use" statement. My question is whether or not this works recursively.
For example: in A - "Use B", in B - "Use C".
Would A have access to the global variables and subprograms contained in C as well?

Thanks a lot. I really appreciate it,

-AA
 
No. A has to Use C as well.

Stuff like this is quite easy to test. Just write some noddy code and try building it. It is a lot faster than asking a question, especially if it works. If it works, you have a solution, if it doesn't then ask a question.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top