The Compare component compares two string objects based on their ASCII values.
Double Click on the
Compare component title bar to open the
Compare component exposes the Control In, Control Out, Data In, and Data Out ports by default.
|ControlIn||Must be connected to the Control Out port of one or more components.|
|ControlOut||Can be connected to the Control In port of another component or the default end component.|
|Compare||can be connected to to another component.|
|Data In||Specifies the text to compare.|
To edit the properties of the
Compare component, in the Properties window, change the required property. You can edit the following properties.
|Search||Search for the respective property.|
|Delay After Execution||Specifies the wait time (in seconds) after the action is performed.|
|Delay Before Execution||Specifies the wait time (in seconds) before the action is performed.|
Let us consider an example.
To compare the ASCII values of two strings:
In the Toolbox, expand
Utilitiesand then expand
Comparecomponent and drop it on the Design surface.
Generalcategory and drag the
Double click on
variableand enter the first string.
Double-click on title bar of
Comparecomponent, click on icon.
Comparision Optionsfrom dropdown list and give the second string.
To display the returned value:
- Expand the
MessageBoxcomponent, drag the
Showcomponent and drop it on the Design surface.
- Expand the
Connect the control ports and data ports in the activity.
In the toolbar, click
If both the strings have Equal value, then control goto
Compareport and then display the
If both string are not Equal, then control goto to