Well this kind of n00b question but I still can't figure it out. I have unit main
with procedure Discard()
in it. Now I have another unit engine
and I want to run from it procedure Discard()
of unit main
. I have main in uses
section of engine.pas
. I tried to call procedure with main.Discard()
but no good. What am I doing wrong?
相关问题
- Is there a Delphi 5 component that can handle .png
- Is there a way to install Delphi 2010 on Windows 2
- Is TWebBrowser dependant on IE version?
- iOS objective-c object: When to use release and wh
- DBGrid - How to set an individual background color
相关文章
- Best way to implement MVVM bindings (View <-> V
- Windows EventLog: How fast are operations with it?
- How to force Delphi compiler to display all hints
- Coloring cell background on firemonkey stringgrid
- HelpInsight documentation in Delphi 2007
- Rails scope for values only between two dates
- Can RTTI interrogate types from project code at de
- How to scope closure's variables in CF10?
You need to put the procedure's signature in your interface, like so:
Other units can only "see" whatever's listed in the interface section.
In unit "Main" you declare Discard in the "interface" section:
Now in unit "Engine" you add "Main" to the "uses" section.
Thats it, you can call
Discard(...)
now. If there are more than oneDiscard()
you can explicitely call thisDiscard()
by usingMain.Discard()
.