IMath.Combin

Syntax

Combin(SetSize: Integer; SampleSize: Integer): Double;

Parameters

SetSize. General number of elements of the set.

SampleSize. A set of elements selected from the general number of element set.

Description

The Combin method returns the number of combinations for the specified number of objects.

Comments

Parameters must be integer and non-negative numbers.

The value of the SampleSize parameter must not exceed the value of the SetSize parameter.

A combination is any set or a subset of objects, regardless of their order. Combinations differ from permutations, for which order is relevant.

Example

To execute the example, add a link to the MathFin system assembly.

Sub UserProc;
Var
    r: Double;
Begin
    r := Math.Combin(8,2);
    Debug.WriteLine(r);
End Sub UserProc;

After executing the example the console window displays the number of combinations which is 28.

See also:

IMath