Transform Reference Guide

==, !=

Compare two values for equality or inequality.

Syntax

== rval
!= rval

Options

Inlets

Outlets

Comments

The equality and inequality operators accept inputs and initialization arguments of any numeric type (Integers, Floats, Doubles, Complex and DoubleComplex) as well as Strings. For scalar input, the operators return a true or false value.

If one of the arguments is an audio-sample type and the other is a numeric type, the equality operator returns a stream of audio-samples whose values are either 1 or 0 depending on whether the corresponding input sample is equal to the numeric argument. The inequality operator returns a similar result but with an output sample value of 1 whenever an input sample is unequal to the numeric argument. The relational operators do not support both parameters being audio samples.

These operators output a result whever a new value is received via the left inlet param1, using the new value of param1 and the most recent value of param2, or the optional initial argument if no value has yet been received for param2. If you want to wait until both param1 and param2 receive new input values before computing a result, use the synchronous operators '== and '!= instead.

See Also

<, <=, >=, >
'==, '!=
Expr

Open Sound World User Guide
© 2000-2004 Amar Chaudhary. All rights reserved.