Combin(SetSize: Integer; SampleSize: Integer): Double;
SetSize. General number of elements of the set.
SampleSize. A set of elements selected from the general number of element set.
The Combin method returns the number of combinations for the specified number of objects.
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.
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: