A newer version of Max is available. Click here to access the latest version of the documentation

!= Reference

Compare numbers for not-equal-to condition

!=

Description

Compares two values to see if one value is not equal to a second. Outputs a 1 if the number is not equal to the comparison-number or 0 if it is equal to it.

Examples

Test if two numbers are not equal

Arguments

initial-comparison-value [int or float]

Optional

Sets the initial value, to be compared with a number received in the left inlet. A float argument forces a float comparison.

Attributes

Common Box Attributes

Messages

bang

In left inlet: Performs the comparison with the numbers currently stored. If there is no argument, != initially holds 0 for comparison.

int

Arguments

input [int]
In left inlet: The number is compared with the number in the right inlet. If the two numbers are not equal, != outputs 1. If they are equal != outputs 0.

  (inlet1)

Arguments

comparison-value [int]
In right inlet: The number is stored, to be compared with a number received in the left inlet.

float

Arguments

input [float]
Converted to int before comparison, unless != has a float argument.

set

Arguments

set-input [int]
Sets the number to be compared without causing output (bang will output it).

list

Arguments

input [number]
comparison-value [number]
In left inlet: Compares first and second number, outputs 1 if they are not equal, 0 if they are equal.

Output

int

1 if the numbers in the inlets are not equal, 0 if they are equal.

See Also

Name Description
select
split
<
<=
==
>
>=
Max Basic Tutorial 19: Timing Max Basic Tutorial 19: Timing