All Manuals > Foreign Language Interface User Guide and Reference Manual > 7 Function, Macro and Variable Reference

cast-integer Function

Summary

Casts an integer to a given type.

Package

fli

Signature

cast-integer integer type => result

Arguments
integer
A Lisp integer.
type
A foreign type.
Values
result
A Lisp integer.
Description

The function cast-integer casts the integer integer to the foreign type type.

type must be a FLI integer type, either primitive or derived.

Examples
(format nil "~B"
        (fli:cast-integer -1 '(:unsigned :int)))
=>
"11111111111111111111111111111111"
See also

:signed
:unsigned


Foreign Language Interface User Guide and Reference Manual - 01 Dec 2021 19:34:58