IncLim Routines
Increments Value but won't go above specified Limit.

Unit
QESBPCSMath

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

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

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

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

Category
Arithmetic Routines for Integers

Implementation

procedure IncLim (var B: Byte; const Limit: Byte);
begin
     if B < Limit then
          Inc (B);
End;

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

Implementation

procedure IncLim (var B: ShortInt; const Limit: ShortInt);
begin
     if B < Limit then
          Inc (B);
End;

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

Implementation

procedure IncLim (var B: SmallInt; const Limit: SmallInt);
begin
     if B < Limit then
          Inc (B);
End;

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

Implementation

procedure IncLim (var B: Word; const Limit: Word);
begin
     if B < Limit then
          Inc (B);
End;

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

Implementation

procedure IncLim (var B: LongInt; const Limit: LongInt);
begin
     if B < Limit then
          Inc (B);
End;

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

Implementation

procedure IncLim (var B: LongWord; const Limit: LongWord);
begin
     if B < Limit then
          Inc (B);
End;

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

Implementation

procedure IncLim (var B: Int64; const Limit: Int64);
begin
     if B < Limit then
          Inc (B);
End;


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