diff --git a/rtl/objpas/math.pp b/rtl/objpas/math.pp index 2c3edaa24f..28da25ee0a 100644 --- a/rtl/objpas/math.pp +++ b/rtl/objpas/math.pp @@ -56,10 +56,10 @@ interface {$ifndef FPUNONE} {$IFDEF FPC_DOTTEDUNITS} uses - System.SysUtils; + System.SysUtils, System.Types; {$ELSE FPC_DOTTEDUNITS} uses - sysutils; + sysutils, types; {$ENDIF FPC_DOTTEDUNITS} {$IFDEF FPDOC_MATH} @@ -144,13 +144,22 @@ Const EInvalidArgument = class(ematherror); - TValueRelationship = -1..1; +{$IFDEF FPC_DOTTEDUNITS} + TValueRelationship = System.Types.TValueRelationship; +{$ELSE FPC_DOTTEDUNITS} + TValueRelationship = types.TValueRelationship; +{$ENDIF FPC_DOTTEDUNITS} const - EqualsValue = 0; - LessThanValue = Low(TValueRelationship); - GreaterThanValue = High(TValueRelationship); - +{$IFDEF FPC_DOTTEDUNITS} + EqualsValue = System.Types.EqualsValue; + LessThanValue = System.Types.LessThanValue; + GreaterThanValue = System.Types.GreaterThanValue; +{$ELSE FPC_DOTTEDUNITS} + EqualsValue = types.EqualsValue; + LessThanValue = types.LessThanValue; + GreaterThanValue = types.GreaterThanValue; +{$ENDIF FPC_DOTTEDUNITS} {$push} diff --git a/rtl/objpas/types.pp b/rtl/objpas/types.pp index 45052701df..9d99b78d4b 100644 --- a/rtl/objpas/types.pp +++ b/rtl/objpas/types.pp @@ -47,6 +47,12 @@ type TDirection = (FromBeginning, FromEnd); TValueRelationship = -1..1; +const + LessThanValue = Low(TValueRelationship); + EqualsValue = 0; + GreaterThanValue = High(TValueRelationship); + +type DWORD = LongWord; PLongint = System.PLongint;