float

Store a decimal number

Description

float can store and output any given floating-point number.

Arguments

Name Type Opt Description
initial-value float opt Sets an initial value to be stored in float. If there is no argument, the initial value is 0.0. A float argument by itself, without the word float, is another way of creating and initializing a float object.

Messages

bang In left inlet: Sends the stored value out the outlet.
int input [int]
Converted to float.
  (inlet1) set-input [float]
In right inlet: The number replaces the stored value without triggering output.
float input [float]
In left inlet: The number replaces the currently stored value and is sent out the outlet.
send receive-object-name [list]
In left inlet: The word send, followed by a name of a receive object, sends the number stored in the float object to all receive objects with that name, without sending it out the float object's outlet.
set set-input [float]
In left inlet: The word set, followed by a number, replaces the stored value without triggering output.

Information for box attributes common to all objects

Output

float: A number is stored in float as a single-precision floating point number. The precision possible in the decimal portion of the number decreases as the integer part increases. Note: Because of the way decimal numbers are stored, a float value saved in a patcher file might be slightly altered when the file is reopened.

Examples

Output the stored value... Replace stored value and output it..... Initial value is given

See Also

Name Description
int Store an integer value
pv Share variables specific to a patch and its subpatches
value Share a stored number with other objects
Max Basic Tutorial 16: Remote Messaging Max Basic Tutorial 16: Remote Messaging