Cross-platform system configuration values.
The command line arguments given to the process. The first element is the command name used to invoke the program. The following elements are the command-line arguments given to the program.
[| "a.out" |].
val interactive : bool ref
interactive is set to
true when being executed in the
ocaml REPL, and
os_type describes the operating system that the OCaml program is running on. Its value is one of
type backend_type = Caml.Sys.backend_type =
Currently, the official distribution only supports
val backend_type : backend_type
Backend type currently executing the OCaml program.
word_size_in_bits is the number of bits in one word on the machine currently executing the OCaml program. Generally speaking it will be either
int_size_in_bits is the number of bits in the
int type. Generally, on 32-bit platforms, its value will be
31, and on 64 bit platforms its value will be
Int.num_bits is the same as this value.
max_string_length is the maximum allowed length of a
String.max_length is the same as this value.
max_array_length is the maximum allowed length of an
Array.max_length is the same as this value.
Returns the name of the runtime variant the program is running on. This is normally the argument given to
Returns the value of the runtime parameters, in the same format as the contents of the
ocaml_version is the OCaml version with which the program was compiled. It is a string of the form
"major.minor[.patchlevel][+additional-info]", where major, minor, and patchlevel are integers, and additional-info is an arbitrary string. The
[+additional-info] parts may be absent.
Controls whether the OCaml runtime system can emit warnings on stderr. Currently, the only supported warning is triggered when a channel created by
open_* functions is finalized without being closed. Runtime warnings are enabled by default.
For the purposes of optimization,
opaque_identity behaves like an unknown (and thus possibly side-effecting) function. At runtime,
opaque_identity disappears altogether. A typical use of this function is to prevent pure computations from being optimized away in benchmarking loops. For example:
for _round = 1 to 100_000 do ignore (Sys.opaque_identity (my_pure_computation ())) done