MkSet Function

Applies to TestComplete 15.47, last modified on January 20, 2023

Creates a set of the given members.

Declaration

MkSet(Param1Param2...) Parameters
Param1 [in] Optional Integer
Param2 [in] Optional Integer
...
Result     Variant  

Description

The MkSet function creates a new set with the specified members. Sets in TestComplete are implemented as collections of bits, similar to Standard Pascal.

You can use this function to obtain the component options or to enumerate set parameters for routines like BuiltIn.MessageDlg or Utilities.StringReplace.

Parameters

The method has the following parameters:

Param1, Param2, ..., ParamN

Specifies the member names or member values to be contained in the set. The ordinal values of set members must range from 0 to 31.

Return Value

The created set.

Remarks

A set can have no more than 32 members.

A set created without parameters, MkSet() denotes an empty set, while MkSet(x) denotes a set whose only member is the value of x.

Example

The following code creates a set with two members:

JavaScript, JScript

function CreateSet()
{
  var mmbFirst = 0;
  var mmbSecond = 31;

  var MySet = MkSet(mmbFirst, mmbSecond);
}

Python

def CreateSet():
  mmbFirst = 0;
  mmbSecond = 31;

  MySet = MkSet(mmbFirst, mmbSecond);

VBScript

Sub CreateSet
  Dim mmbFirst, mmbSecond, MySet

  mmbFirst = 0
  mmbSecond = 31

  MySet = MkSet(mmbFirst, mmbSecond)
End Sub

DelphiScript

procedure CreateSet;
var mmbFirst, mmbSecond, MySet;
begin
  mmbFirst := 0;
  mmbSecond := 31;

  MySet := MkSet(mmbFirst, mmbSecond);
end;

C++Script, C#Script

function CreateSet()
{
  var mmbFirst = 0;
  var mmbSecond = 31;

  var MySet = MkSet(mmbFirst, mmbSecond);
}

See Also

InSet Function

Highlight search results