Solved

Global variables in Delphi???

Posted on 1999-01-20
4
359 Views
Last Modified: 2010-04-06
Is it possible to declare global variables in Delphi 3 so it's available from the whole modules of the app?
0
Comment
Question by:forns
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 2

Accepted Solution

by:
Thaddy earned 20 total points
ID: 1362491
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
 

Author Comment

by:forns
ID: 1362492
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
 

Author Comment

by:forns
ID: 1362493
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
 
LVL 2

Expert Comment

by:Thaddy
ID: 1362494
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

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question