* Raise range error exception directly to prevent note "Local variable "rcheck" is assigned but never used".

git-svn-id: trunk@9555 -
This commit is contained in:
yury 2007-12-28 00:17:11 +00:00
parent cd03a2893b
commit 93e62a3c0d

View File

@ -823,7 +823,7 @@ INTERFACE
IMPLEMENTATION
USES
classes;
classes {$ifopt r+}, sysconst {$endif};
type
TFMTBcdFactory = CLASS(TPublishableVarianttype)
@ -866,9 +866,10 @@ IMPLEMENTATION
range_fracdigits = 0..pred ( MaxFmtBCDFractionSize );
{$ifopt r+}
var
rcheck : 0..0;
rbad : Byte = 1;
procedure RangeError;
begin
raise ERangeError.Create(SRangeError);
end;
{$endif}
{$ifndef debug_version}
@ -1986,8 +1987,8 @@ IMPLEMENTATION
begin
NormalizeBCD := True;
{$ifopt r+}
if ( Prec < 0 ) OR ( Prec > MaxFmtBCDFractionSize ) then rcheck := rbad;
if ( Scale < 0 ) OR ( Prec >= MaxFmtBCDFractionSize ) then rcheck := rbad;
if ( Prec < 0 ) OR ( Prec > MaxFmtBCDFractionSize ) then RangeError;
if ( Scale < 0 ) OR ( Prec >= MaxFmtBCDFractionSize ) then RangeError;
{$endif}
if BCDScale ( InBCD ) > Scale
then begin