3. Data Types

3 Data Types

Erlang provides a number of data types, which are listed in this section.

3.1 Terms

A piece of data of any data type is called a term.

3.2 Number

There are two types of numeric literals, integers and floats. Besides the conventional notation, there are two Erlang-specific notations:

  • $char
    ASCII value or unicode code-point of the character char.
  • base#value
    Integer with the base base, that must be an integer in the range 2..36.
    In Erlang 5.2/OTP R9B and earlier versions, the allowed range is 2..16.

Examples:登录查看完整内容