08-24-2020, 07:13 PM
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;
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;