jahlxx Posted April 9, 2018 Posted April 9, 2018 Hi.. Someone knows how to include a piece of code in a delphi unit? I have some pieces of code, and must repeat in every unit. Can I have that code in a external file and include in the units I need? I have read about the {$I} directive, but raises compilation error. Thanks.
Ron Posted April 9, 2018 Posted April 9, 2018 Sure, just choose File->New->Unit - Delphi, and you will get a blank text-only unit file without a form. Give it a name and paste the code there, and then refer to that unit in the uses clause of other units, and you have access. 1
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now