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

< Reference

Compare numbers for less than condition

<

Description

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

Examples

Number on left is less than number on right... Number on left is not less than number on right

Arguments

initial-comparison-value [number]

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: If the number is less than the number in the right inlet, < outputs 1. Otherwise, < 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]
The word set followed by a number will set the input value without causing output.

Output

int

1 if the number in the left inlet is less than the number in the right inlet. 0 if the number in the left inlet is greater than or equal to the number in the right inlet.

See Also

Name Description
!=
<=
==
>
>=
Max Basic Tutorial 19: Timing Max Basic Tutorial 19: Timing