Not equal to Version 1 (Java)


Description

The action compares the data type and value of two operands. Returns "True" if the first operand is not equal to the second operand.

Action icon

Parameters

Input parameters

ParameterDescription
Operand 1Operand 1 value.
Operand 2Operand 2 value.

Output parameters

Result - result of comparing two operands.

Settings

Property

Mandatory field

Description

Type

Filling example

Input parameters





Operand 1

yes

Operand 1 value

Robin.Object


Operand 2yes

Operand 2 value

Robin.Object


Output parameters





Result


Result of comparing two operandsRobin.Boolean


Special conditions of use

The action returns True if the operand data types differ.

The action returns True if the operand data values differ.

The action returns False if the operand data types and values are equal.

Example of use

Example 1

Task

There is a numeric "Variable 1" with value = 7 and a string "Variable 2" with value = 7. Check the expression "Variable 1"≠"Variable 2". 

Solution

Use the "Not equal to" action.

Implementation

  1. Create a variable with numeric type "Variable 1" with value = 7.
  2. Create a variable with type string "Variable 2" with value = 7.

  3. Move the "Not equal to" action to the workspace and set its parameters.

  4. Start the robot by clicking "Start" in the top panel.

Result

The comparison of variable values was successful, the result of the comparison is True.


Example 2

Task

There is a numeric "Variable 1" with value = 7 and a numeric "Variable 2" with value = 9. We need to check the expression "Variable 1"≠"Variable 2". 

Solution

Use the "Not equal to" action.

Implementation

  1. Create a variable with numeric type "Variable 1" with value = 7.

  2. Create a variable with numeric type "Variable 2" with value = 9.
  3. Move the "Not equal to" action to the workspace and set its parameters. 
  4. Start the robot by clicking "Start" in the top panel.

Result

The comparison of variable values was successful, the result of the comparison is True.


Example 3

Task

There is a string "Variable 1" with value = "Hello" and a string "Variable 2" with value = "Hello". We need to check the expression "Variable 1"≠"Variable 2". 

Solution

Use the "Not equal to" action.

Implementation

  1. Create a variable with type string "Variable 1" with value = "Hello".

  2. Create a variable with type string "Variable 2" with value = "Hello".

  3. Move the "Not equal to" action to the workspace and set its parameters.
  4. Start the robot by clicking "Start" in the top panel.

Result

The comparison of variable values was successful, the result of the comparison is False.


  • Нет меток