Board index » delphi » How Do I Break Up Large *.PAS Files?

How Do I Break Up Large *.PAS Files?

My Unit1.Pas file is getting too large to handle. Can anyone tell me
how to break it up into smaller files? Thank you,

Dennis Vogel
in Mobile, Alabama
mailto:dvo...@sprynet.com

 

Re:How Do I Break Up Large *.PAS Files?


Quote
Dennis Vogel wrote:

> My Unit1.Pas file is getting too large to handle. Can anyone tell me
> how to break it up into smaller files? Thank you,

        Dennis it would help if you told us what Unit1.Pas was.

        One hint is to try to keep units together only if they
        represent a logical function base.  For example I have
        a unit called Customer.Pas it keeps all information
        releated to my TCustomer Class.  I don't put TLineItems
        in this Unit.

        brant
        ...

Re:How Do I Break Up Large *.PAS Files?


On Tue, 17 Dec 1996 05:38:25 -0600, Dennis Vogel <dvo...@sprynet.com>
wrote:

Quote
>My Unit1.Pas file is getting too large to handle. Can anyone tell me
>how to break it up into smaller files? Thank you,

Use the compiler directive : {$i <filename>}

You can include files at any place in the code with this directive.

  Bob van Rooij

  bvanro...@kiss.nl
  ro...@telebyte.nl

Re:How Do I Break Up Large *.PAS Files?


If there is no way you can actually break up the code into seperate 'delphi
units' then you can use the {$I Filename} directive to include seperate
files.

E.G.

Unit1
...
...
implementation

{$I Stuff1}

blah...
blah...

end;

Then write out some of the code in your the stuff1.pas file.

Warning: Although you can open the stuff1.pas file in delphi to edit it, it
is NOT saved when you press the 'Save Project' button. Instead you must be
on that page and press 'Save File'.

Dennis Vogel <dvo...@sprynet.com> wrote in article
<32B68631.7...@sprynet.com>...

Quote
> My Unit1.Pas file is getting too large to handle. Can anyone tell me
> how to break it up into smaller files? Thank you,

> Dennis Vogel
> in Mobile, Alabama
> mailto:dvo...@sprynet.com

Other Threads