Solved

Global variables in Delphi???

Posted on 1999-01-20
4
343 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
  • 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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

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…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

746 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now