LispWorks Foreign Language Interface User Guide and Reference Manual > 5 Function and Macro Reference

NextPrevUpTopContentsIndex

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.

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

:signed
:unsigned


LispWorks Foreign Language Interface User Guide and Reference Manual - 21 Dec 2009

NextPrevUpTopContentsIndex