Board index » delphi » Including other *.pas in main.pas?

Including other *.pas in main.pas?

Hi,

Can someone tell me how to combine 2 pas files into one other
than copying and pasting it in one big file.

Thanks for the help in advance.

-joe

 

Re:Including other *.pas in main.pas?


On 13 Feb 1998, "Joseph Chia" <black...@singnet.com.sg> wrote:
JC> Can someone tell me how to combine 2 pas files into one other
JC> than copying and pasting it in one big file.

Should be as simple as using the {$I filename} statement.

--
Erik W. Anderson, GIS Analyst   WWW:    http://www.wa.gov/kitsap/
Kitsap County DCD/GIS           E-mail: e-ander...@co.kitsap.wa.us
614 Division St., MS-36         Voice:  (360) 895-3743
Port Orchard, WA 98366-4682     FAX:    (360) 895-4925

The opinions expressed herein are my own and not that of Kitsap
County.

(to reply to this message, remove the dash from my username. I
apologize in advance for the inconvenience.)

Re:Including other *.pas in main.pas?


Quote
>Can someone tell me how to combine 2 pas files into one other
>than copying and pasting it in one big file.

Well, if you are using Borland's Pascal products, there is a compiler directive
that does just that.

  {$I Filename}

This is in include directive.  When the compiler sees this directive, it will
hunt for the specified file and include it into the source compilation just as
if it was in the source file.

Other Threads