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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Gloabal variables

Status
Not open for further replies.

godatguitar

Programmer
May 8, 2003
33
GB
Hi All

Firstly, many thanks to all of you who have helped me. I am well underway with my project now!

I have a small, probably easy question regarding global variables:

I need a variable to be accessed by 2 proc's, called mark. Where do i declare this variable, and how do i declare it? It was declared in one of the proc's as "global mark" But this does not work.

Cheers in advance
 
You need to declare it in all proc's as global (i.e., global mark). Alternatively, you can refer to it (always!) as ::mark. The "::" prefix refers to variables in the global namespace.

Bob Rashkin
rrashkin@csc.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top