Unit NumMan

--------------------------------------------------- Numbers Manager Copyright (r) by DreamFactory Version : 1.75 Author : William Yang Last Update 24 - Aug - 97 ---------------------------------------------------

Classes

Functions

AllBetween - Check if these numbers in the range
AllEqual -
Between -
BSwap -
FindNum - Find a number an array of numbers, returns the index of the first catch.
FindPairs - Find pairs, returns the total amount of pairs.
FSwap -
IntToBin -
IsIncreasement - Check if the numbers are like (1, 2, 3, 4, 5), you can set InOrder to false if you want check(4,2,3,5,1)

if j is equal to the total increasement + minmost value.
IsIncreasementExt - more customisable with amount that increase
ISwap -
MakeBetween -
Max -
MaxBits -
MaxMost - If there is 5 numbers, if a number smaller than other 4 then it is the smallest
Min -
MinMost -
NumAppears - Find the how many times the number appears.
ReadBits -
RectHeight -
RectWidth -
WriteBits -

Types

Constants

Variables


Functions


function AllBetween(Nums: array of Integer; nFrom, nTo : Integer): Boolean;

Check if these numbers in the range

function AllEqual(Nums: array of Integer): Boolean;


function Between(S, N1, N2 : Integer) : Boolean;


procedure BSwap(var n1, n2: Byte);


function FindNum(Num: Integer; Nums: array of Integer): Integer;

Find a number an array of numbers, returns the index of the first catch.

function FindPairs(Nums: array of Integer): Integer;

Find pairs, returns the total amount of pairs.

0000 1111 and 1011 0111 ---- ---- ---- 0000 0111 } //Initialize Bitmask with 0.


procedure FSwap(var n1, n2: Double);


function IntToBin(Num: Integer): String;


function IsIncreasement(Nums: array of Integer; InOrder: Boolean): Boolean;

Check if the numbers are like (1, 2, 3, 4, 5), you can set InOrder to false if you want check(4,2,3,5,1)

if j is equal to the total increasement + minmost value.


function IsIncreasementExt(Nums: array of Integer; InOrder: Boolean; Incs: Integer): Boolean;

more customisable with amount that increase

procedure ISwap(var n1, n2: Integer);


function MakeBetween(S, nFrom, nTo : Integer) : Integer;


function Max(X, Y: Integer): Integer;


function MaxBits(Num: Integer): Integer;


function MaxMost(Nums: array of Integer): Integer;

If there is 5 numbers, if a number smaller than other 4 then it is the smallest

function Min(X, Y: Integer): Integer;


function MinMost(Nums: array of Integer): Integer;


function NumAppears(Num: Integer; Nums: array of Integer): Integer;

Find the how many times the number appears.

function ReadBits(Num, Start, Count: Integer): Integer;


function RectHeight(Rect: TRect) : Integer;


function RectWidth(Rect: TRect) : Integer;


function WriteBits(Num, Start, Val: Integer): Integer;


Types


Constants


Variables