LispWorks Foreign Language Interface User Guide and Reference Manual > 6 Type Reference

NextPrevUpTopContentsIndex

:boolean

FLI type descriptor
Summary

Converts between a Lisp boolean value and a C representation of a boolean value.

Syntax

:boolean &optional encapsulates

Arguments

encapsulates

An integral type.

Description

The FLI :boolean type converts between a Lisp boolean value and a C representation of a boolean value. The encapsulates option is used to specify the size of the value from which the boolean value is obtained. For example, if a byte is used in C to represent a boolean, the size to map across for the FLI will be one byte, but if an int is used, then the size will be four bytes.

A value of 0 in C represents a nil boolean value in Lisp, and a non-zero value in C represents a t boolean value in Lisp.

Example

In the following three examples, the size of a :boolean , a (:boolean :int) and a (:boolean :byte) are returned.

(fli:size-of :boolean) (fli:size-of '(:boolean :int)) (fli:size-of '(:boolean :byte))
See also

size-of


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

NextPrevUpTopContentsIndex