Previous Contents Next
6.2 Values

This section describes the kinds of values that are manipulated by Objective Caml programs.

6.2.1 Base values

Integer numbers

Integer values are integer numbers from -230 to 230-1, that is -1073741824 to 1073741823. The implementation may support a wider range of integer values: on 64-bit platforms, the current implementation supports integers ranging from -262 to 262-1.

Floating-point numbers

Floating-point values are numbers in floating-point representation. The current implementation uses double-precision floating-point numbers conforming to the IEEE 754 standard, with 53 bits of mantissa and an exponent ranging from -1022 to 1023.

Characters

Character values are represented as 8-bit integers between 0 and 255. Character codes between 0 and 127 are interpreted following the ASCII standard. The current implementation interprets character codes between 128 and 255 following the ISO 8859-1 standard.

Character strings

String values are finite sequences of characters. The current implementation supports strings containing up to 224 - 6 characters (16777210 characters).

6.2.2 Tuples

Tuples of values are written (v1, ..., vn), standing for the n-tuple of values v1 to vn. The current implementation supports tuple of up to 222 - 1 elements (4194303 elements).

6.2.3 Records

Record values are labeled tuples of values. The record value written {