···701701702702\subsection{ss:c-int-ops}{Operations on integers}
703703704704+The header "<caml/config.h>" defines a C integer type "intnat" of signed 64-bit
705705+integers (32-bit integers on 32-bit architectures). This type is used to
706706+represent the integer encoded by a "value" corresponding to an unboxed integer
707707+without truncation.
708708+704709\begin{itemize}
705705-\item "Val_long("\var{l}")" returns the value encoding the "long int" \var{l}.
706706-\item "Long_val("\var{v}")" returns the "long int" encoded in value \var{v}.
710710+\item "Val_long("\var{n}")" returns the value encoding the "intnat" \var{n}.
711711+\item "Long_val("\var{v}")" returns the "intnat" encoded in value \var{v}.
707712\item "Val_int("\var{i}")" returns the value encoding the "int" \var{i}.
708708-\item "Int_val("\var{v}")" returns the "int" encoded in value \var{v}.
713713+\item "Int_val("\var{v}")" returns the "int" encoded in value \var{v}. Note that
714714+this operation may result in a truncated value since "int" is 32-bit wide on
715715+64-bit architectures.
709716\item "Val_bool("\var{x}")" returns the OCaml boolean representing the
710717truth value of the C integer \var{x}.
711718\item "Bool_val("\var{v}")" returns 0 if \var{v} is the OCaml boolean
712719"false", 1 if \var{v} is "true".
713720\item "Val_true", "Val_false" represent the OCaml booleans "true" and "false".
714714-\item "Val_emptylist", "Val_emptylist" represents the empty list.
721721+\item "Val_emptylist" represents the empty list.
715722\item "Val_none" represents the OCaml value "None".
716723\end{itemize}
717724