From 69f8751c7a6c868b679a0104c14423a5b976e804 Mon Sep 17 00:00:00 2001 From: florian Date: Mon, 10 Nov 2003 18:05:16 +0000 Subject: [PATCH] + is_single added --- compiler/defutil.pas | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/compiler/defutil.pas b/compiler/defutil.pas index 7d4d099e06..d3a408695b 100644 --- a/compiler/defutil.pas +++ b/compiler/defutil.pas @@ -157,6 +157,9 @@ interface {# Returns true, if def is a currency type } function is_currency(def : tdef) : boolean; + {# Returns true, if def is a single type } + function is_single(def : tdef) : boolean; + {# Returns true, if def is a 64 bit integer type } function is_64bitint(def : tdef) : boolean; @@ -212,6 +215,14 @@ implementation end; + { returns true, if def is a currency type } + function is_single(def : tdef) : boolean; + begin + result:=(def.deftype=floatdef) and + (tfloatdef(def).typ=s32real); + end; + + function range_to_basetype(low,high:TConstExprInt):tbasetype; begin { generate a unsigned range if high<0 and low>=0 } @@ -822,7 +833,10 @@ implementation end. { $Log$ - Revision 1.6 2003-10-01 20:34:48 peter + Revision 1.7 2003-11-10 18:05:16 florian + + is_single added + + Revision 1.6 2003/10/01 20:34:48 peter * procinfo unit contains tprocinfo * cginfo renamed to cgbase * moved cgmessage to verbose