[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

.DEF file problems...

Posted on 1998-03-17
1
Medium Priority
?
136 Views
Last Modified: 2010-04-06
Hi,
   I want to write a unit which just contains procedures which can be used by the Main unit. I've tried doing this, but I don't know how to write a definition file for it. It doesn't contain any objects or attributes, just a list of procedures. Can anyone tell me how to do this?
Cheers.
0
Comment
Question by:PiersBull
[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
1 Comment
 
LVL 4

Accepted Solution

by:
d003303 earned 40 total points
ID: 1360527
Where should the code of the procedures resist ? In an external DLL or in the definition file ?
The interface part of any unit is a kind of definition file. It defines the interfaces of the unit. The implementation part contains the code of the interfaces or their adress in external libraries.
e.g.

// to be MyProcs.pas
unit MyProcs

interface

function TimesTwo(AValue : Integer): Integer;

implementation

function TimesTwo(AValue : Integer): Integer;
begin
  Result := AValue * 2;
end;

end.
// **

Just put MyProcs.pas in your link path, include MyProcs into the uses clause of the main unit and that's it.


Slash/d003303
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

650 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