17.05.2015 Views

zl:1 - FTP

zl:1 - FTP

zl:1 - FTP

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

489 simple-vector<br />

simple-vector &optional ( size '. ) Type Specifier<br />

simple-vector is the type specifier symbol for the Lisp data structure of<br />

that name.<br />

The type simple-vector is a subtype of the types:<br />

vector<br />

(vector t)<br />

Note: Although string is a subtype of vector, simple-string is not a subtype<br />

of simple-vector.<br />

The types simple-vector, simple-string, and simple-bit-vector are disjoint<br />

subtypes of the type simple-array: simple-vector means (simpl e-array t<br />

(*»; simple-string means (si mpl e-array stri ng-char) or (simpl e-array<br />

character); simple-bit-vector means (si mpl e-array bi t (*».<br />

This type specifier can be used in either symbol or list form. Used in list<br />

form, simple-vector defines the set of specialized one-dimensional arrays of<br />

size size. This is the same as (vector t size), except that it additionally<br />

specifies that its elements are simple general vectors.<br />

Examples:<br />

(typep #(13 3 B) Jsimple-vector) => T<br />

(subtypep Jsimple-vector Jvector) => T and T<br />

(sys:type-arglist Jsimple-vector) => (&OPTIONAL (SIZE J*»<br />

(simple-vector-p #(a b c»<br />

=> T<br />

(typep #(1 1 2) J(simple-vector 3»<br />

=> T<br />

and T<br />

See the section "Data Types and Type Specifiers" in Symbolics Common<br />

Lisp: Language Concepts. See the section "Arrays" in Symbolics Common<br />

Lisp: Language Concepts.<br />

I<br />

simple-vector-p object Function<br />

Tests whether the given object is a simple general vector. A simple<br />

general vector is a one-dimensional array whose elements have no type constraints;<br />

the array is not displaced to another array and has no fill pointer.<br />

See the type specifier simple-vector, page 489.<br />

(simple-vector-p (make-array 3»<br />

=> T<br />

(simple-vector-p<br />

(make-array 5 :element-type Jbit :fill-pointer 2»<br />

=> NIL

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!