Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Global variables in Delphi???

Posted on 1999-01-20
4
Medium Priority
?
370 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 60 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

721 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