More Pascal woes.
Say I have 2 Units, MainUnit
, and ExampleClass
.
MainUnit:
Unit MainUnit;
interface
Uses ExampleClass;
function ReturnFive: Integer;
implementation
function ReturnFive: Integer;
begin
ReturnFive := 5;
end;
begin
end.
ExampleClass:
Unit ExampleClass;
{$mode objfpc}
interface
type
ClassThing = Class
SampleValue: Integer;
end;
implementation
begin
end.
Now, I'd like to only import MainUnit
, but still be able to use ClassThing
. MainUnit
uses ExampleClass
, but ClassThing
isn't usable when you import MainUnit
.
I don't really want to just use
ExampleClass
along with MainUnit
, I'd prefer to keep it in one uses
statement.
How do you do this?