Global variables in Delphi???

Is it possible to declare global variables in Delphi 3 so it's available from the whole modules of the app?
fornsAsked:
Who is Participating?
 
ThaddyConnect With a Mentor Commented:
Yes. Simple include the unit where the global variable is declared in the uses clause of the units where you want to access it.
0
 
fornsAuthor Commented:
Isn't it possible to declare them in the Project Source (the main, let's say)?

Don't comment to this question, answer it, so i'll be able to give you the points.
0
 
fornsAuthor Commented:
Isn't it possible to declare them in the Project Source (the main, let's say)?

Don't comment to this question, answer it, so i'll be able to give you the points.
0
 
ThaddyCommented:
No, that's not possible, you can't refer to the project source from the other units. But you can put the globals in their own unit and include them where needed.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.