Name

deref-array — Deference an array. Macro

Syntax

	  deref-array array type position => value
	

Arguments and Values

array

A foreign array.

type

The foreign type of the array.

position

An integer specifying the position to retrieve from the array.

value

The value stored in the position of the array.

Description

Dereferences (retrieves) the value of an array element.

Examples

(def-array-pointer ca :char)
(let ((fs (convert-to-foreign-string "ab")))
   (values (null-char-p (deref-array fs 'ca 0))
           (null-char-p (deref-array fs 'ca 2))))
=> NIL
   T
	

Notes

The TYPE argument is ignored for CL implementations other than AllegroCL. If you want to cast a pointer to another type use WITH-CAST-POINTER together with DEREF-POINTER/DEREF-ARRAY.

Side Effects

None.

Affected by

None.

Exceptional Situations

None.