package integers
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page
Various signed and unsigned integer types for OCaml
Install
dune-project
Dependency
Authors
Maintainers
Sources
integers-0.2.0.tbz
sha256=b3d554125aefebe65e4e7d350fd526f7b788d74503daee1f1ec60a425184a73c
md5=0d485413bf08a238a424c0f573d5c3c3
doc/README.html
ocaml-integers
The ocaml-integers library provides a number of 8-, 16-, 32- and 64-bit signed and unsigned integer types, together with aliases such as long and size_t whose sizes depend on the host platform.
Features
The interfaces follow the pattern of the signatures of the
Int32,Int64, andNativeintmodules in the OCaml standard library.The behaviour also follows the standard library; for example, conversions such as
of_inttruncate, and operations are "modulo" in general:# Unsigned.UInt8.(pred zero);; - : Unsigned.UInt8.t = <uint8 255>Top-level printers for each type are included
# Unsigned.UInt32.[of_int 103; one; of_string "1000"];; - : Unsigned.UInt32.t list = [<uint32 103>; <uint32 1>; <uint32 1000>]Infix operators are available:
# Unsigned.UInt32.(Infix.(one + one));; - : Unsigned.UInt32.t = <uint32 2>Polymorphic operations such as comparison behave correctly:
# open Unsigned.UInt32 # zero < one;; - : bool = true # max_int < zero;; - : bool = falseIntegers 32 bits and above are boxed; integers below 32 bits are unboxed.
# Obj.(tag (repr Unsigned.UInt32.zero));; - : int = 255 # Obj.(tag (repr Unsigned.UInt16.zero));; - : int = 1000
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page