NextPrevUpTopContentsIndex

enum-symbol-value

Function
Summary

Finds an index in a FLI enumerator type.

Package

fli

Signature

enum-symbol-value enum-type symbol => index

Arguments

enum-type

A FLI enumerator type.

symbol

A symbol.

Values

index

An integer or nil .

Description

The function enum-symbol-value returns the index index of symbol symbol in the FLI enumerator type enum-type , or nil if enum-type does not contain symbol .

Example
(fli:define-c-enum colors red green blue)
=>
(:ENUM COLORS)
 
(fli:enum-symbol-value 'COLORS 'red)
=>
0
(fli:define-c-enum half_year (jan 1) feb mar apr may jun)
=>
(:ENUM HALF_YEAR)
 
(fli:enum-symbol-value 'HALF_YEAR 'feb)
=>
2
See also

define-c-enum
enum-value-symbol


LispWorks Foreign Language Interface User Guide and Reference Manual - 14 Mar 2008

NextPrevUpTopContentsIndex