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

atoi

Convert ASCII characters to integers

Description

atoi converts any given character to a corresponding ASCII integer value.

Arguments

None.

Messages

bang In left inlet: a bang message can be used to trigger the output of the currently stored numerical list. A bang in the right two inlets is treated as a symbol.
int input [int]
In left inlet: The ASCII value of each of the digits of the number is stored internally and sent out the outlet as a list.
float input [float]
In left inlet: The ASCII value of each of the digits of the number is stored internally and sent out the outlet as a list.
list input [list]
Each int in the list is converted to ASCII as described above, and a space character (ASCII value 32) is inserted between items in the list. The middle inlet is used to append to the currently stored list, and the right inlet will set the contents of the internally stored list, without causing output.
anything input [list]
In left inlet: The ASCII value of each letter, digit, or other character in the symbol is stored internally and sent out the outlet as a list.

In middle inlet: The ASCII value of each letter, digit, or other character in the symbol is appended to the currently stored list. No output is triggered.

In right inlet: The ASCII value of each letter, digit, or other character in the symbol is stored internally, replacing the previously stored list, but not output.
clear In left inlet: The clear message is used to clear the contents of the internally-stored numerical list. The word clear in the right two inlets is treated as a symbol.

Information for box attributes common to all objects

Output

list: The ASCII representation of the input is sent out as a list of integers.

Examples

See Also

Name Description
itoa Convert integers to ASCII characters
key Report key presses on the computer keyboard
keyup Report key releases on the computer keyboard
message Send any message
regexp Use PERL-style regular expressions to process input
spell Convert input to ASCII codes
sprintf Format a message of words and numbers