On Thu, 24 Sep 2020 14:22:13 +0200, Sven Barth via lazarus
<[email protected]> wrote:

>Well, Bo could always split the data type declarations into a separate
>unit.

But I cannot wrap my head around this (constructed example):

interface

type
 TMyRecord = packed record
   Item1: word;
   Item2: Cardinal;
  end;


TMyController = class
  private
    FGPIO_driver: TIoDriver;
    FGpF: TIoPort;
    function CheckValidRelay(Relay: byte): boolean;
  public
    constructor Create;
    destructor Destroy; override;
    procedure ClearRelays;
    function PulseRelay(Relay: byte; PulseTime: LongWord): boolean;
    function RelayOff(Relay: byte): boolean;
    function RelayOn(Relay: byte): boolean;
    function RelayState(Relay: byte): boolean;
    procedure Delay(T: LongWord);
  end;

implementation
  ...All of the methods here...

AFAIK the records could be declared elsewhere but the objects not
since their methods, constructor, destructor etc reside in the same
file below implementation, right?

Just specifying a uses file with everything above the implementation
will not cut it, right?

But as I indicated I have just moved on and I am leaving this because
it seems to do more harm than good and is a lot of work too.


-- 
Bo Berglund
Developer in Sweden

-- 
_______________________________________________
lazarus mailing list
[email protected]
https://lists.lazarus-ide.org/listinfo/lazarus

Reply via email to