* use a {$if defined()} sequence, instead of nested ifdefs for selecting the

float type in unit math

git-svn-id: trunk@26265 -
This commit is contained in:
nickysn 2013-12-22 19:18:15 +00:00
parent 65d24e000f
commit 90b69184f1

View File

@ -58,43 +58,37 @@ interface
{ natural size for the processor } { natural size for the processor }
{ WARNING : changing float type will } { WARNING : changing float type will }
{ break all assembler code PM } { break all assembler code PM }
{$ifdef FPC_HAS_TYPE_FLOAT128} {$if defined(FPC_HAS_TYPE_FLOAT128)}
type type
float = float128; float = float128;
const const
MinFloat = MinFloat128; MinFloat = MinFloat128;
MaxFloat = MaxFloat128; MaxFloat = MaxFloat128;
{$else FPC_HAS_TYPE_FLOAT128} {$elseif defined(FPC_HAS_TYPE_EXTENDED)}
{$ifdef FPC_HAS_TYPE_EXTENDED}
type type
float = extended; float = extended;
const const
MinFloat = MinExtended; MinFloat = MinExtended;
MaxFloat = MaxExtended; MaxFloat = MaxExtended;
{$else FPC_HAS_TYPE_EXTENDED} {$elseif defined(FPC_HAS_TYPE_DOUBLE)}
{$ifdef FPC_HAS_TYPE_DOUBLE}
type type
float = double; float = double;
const const
MinFloat = MinDouble; MinFloat = MinDouble;
MaxFloat = MaxDouble; MaxFloat = MaxDouble;
{$else FPC_HAS_TYPE_DOUBLE} {$elseif defined(FPC_HAS_TYPE_SINGLE)}
{$ifdef FPC_HAS_TYPE_SINGLE}
type type
float = single; float = single;
const const
MinFloat = MinSingle; MinFloat = MinSingle;
MaxFloat = MaxSingle; MaxFloat = MaxSingle;
{$else FPC_HAS_TYPE_SINGLE} {$else}
{$fatal At least one floating point type must be supported} {$fatal At least one floating point type must be supported}
{$endif FPC_HAS_TYPE_SINGLE} {$endif}
{$endif FPC_HAS_TYPE_DOUBLE}
{$endif FPC_HAS_TYPE_EXTENDED}
{$endif FPC_HAS_TYPE_FLOAT128}
type type
PFloat = ^Float; PFloat = ^Float;