Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Cross Talk error
#1
v.2.0.27

I am trying to compile Net.mscorlib and the following code errors at the line: const MaxValue: Byte = 255; 

The error is the following:  [dcc32 Error] NET.mscorlib.pas(355): E2010 Incompatible types: 'Byte' and 'Integer'

How do I correct this?

Here is the full object.


Byte = class(TCTBaseObject)
  private
  protected
    class function CTFullTypeName: string; override;
  public
    const MaxValue: Byte = 255;
    const MinValue: Byte = 0;
    function CompareTo(
      const aValue: TCTObject): Int32; overload;
    function CompareTo(
      const aValue: Byte): Int32; overload;
    function Equals(
      const aObj: TCTObject): Boolean; reintroduce; overload;
    function Equals(
      const aObj: Byte): Boolean; reintroduce; overload;
    function GetHashCode: Int32; reintroduce; overload;
    class function Parse(
      const s: string): Byte; overload;
    class function Parse(
      const s: string;
      const aStyle: NumberStyles): Byte; overload;
    class function TryParse(
      const s: string;
      out aResult: Byte): Boolean; overload;
    function ToString: string; reintroduce; overload;
    function ToString(
      const aFormat: string): string; reintroduce; overload;
    function GetTypeCode: TypeCode; overload;
    function GetType: TypeNET; overload;

  end;
Reply
#2
1) Are you selecting classes or using generate all option?

2) If you are selecting classes, can you send me a simplified project including the .CTP file to test? You can attach as a zipo file here.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)