i working with overload of operator, and i have this situation, fra a side:
unit _TIns;
interface
uses
_TExtract;
type
TIns = record
private type
TInsArray = array [1..90] of Boolean;
var
FInsArray: TInsArray;
public
class operator Implicit(const Value: TExtract): TIns;
class operator Implicit(const Value: TIns): TExtract;
end;
implementation
// Code
end.
and, from other side:
unit _TExtract;
interface
uses
_TIns;
type
TExtract = record
private type
TExtractEnum = 1 .. 90;
var
FExtractEnum: TExtractEnum;
public
class operator Implicit(const Value: Integer): TExtract;
class operator Implicit(const Value: TExtract): Integer;
class operator In(A: TExtract; B: TIns) : Boolean;
end;
implementation
// Code
end.
Of course, i have understood where is the problem, and it is that both unit call other. But not have understood as solve it. If i try to define it in same unit the first TExtract not find TIns, or otherwise TIns not find TExtract. I can delete dependency and solve so, only if not exist solution, but i would use this data type for both. Thanks very much for help and good new year to all.