DecLim Routines
Decrements Value but won't go below specified Limit.

Unit
QESBPCSMath

Overloaded Variants
Procedure DecLim(var B: Byte; const Limit: Byte);
Procedure DecLim(var B: ShortInt; const Limit: ShortInt);
Procedure DecLim(var B: SmallInt; const Limit: SmallInt);
Procedure DecLim(var B: Word; const Limit: Word);
Procedure DecLim(var B: LongInt; const Limit: LongInt);
Procedure DecLim(var B: LongWord; const Limit: LongWord);
Procedure DecLim(var B: Int64; const Limit: Int64);

Declaration
Procedure DecLim(var B: Byte; const Limit: Byte);

Description
If Value is already below limit than that value is returned.

Parameters
Value to process.
Limit Value that Decrement won't go pass.

Category
Arithmetic Routines for Integers

Implementation

procedure DecLim (var B: Byte; const Limit: Byte);
begin
     if B > Limit then
          Dec (B);
End;

Declaration
Procedure DecLim(var B: ShortInt; const Limit: ShortInt);

Implementation

procedure DecLim (var B: ShortInt; const Limit: ShortInt);
begin
     if B > Limit then
          Dec (B);
End;

Declaration
Procedure DecLim(var B: SmallInt; const Limit: SmallInt);

Implementation

procedure DecLim (var B: SmallInt; const Limit: SmallInt);
begin
     if B > Limit then
          Dec (B);
End;

Declaration
Procedure DecLim(var B: Word; const Limit: Word);

Implementation

procedure DecLim (var B: Word; const Limit: Word);
begin
     if B > Limit then
          Dec (B);
End;

Declaration
Procedure DecLim(var B: LongInt; const Limit: LongInt);

Implementation

procedure DecLim (var B: LongInt; const Limit: LongInt);
begin
     if B > Limit then
          Dec (B);
End;

Declaration
Procedure DecLim(var B: LongWord; const Limit: LongWord);

Implementation

procedure DecLim (var B: LongWord; const Limit: LongWord);
begin
     if B > Limit then
          Dec (B);
End;

Declaration
Procedure DecLim(var B: Int64; const Limit: Int64);

Implementation

procedure DecLim (var B: Int64; const Limit: Int64);
begin
     if B > Limit then
          Dec (B);
End;


HTML generated by Time2HELP
http://www.time2help.com