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.

<strong>zl</strong>:array 28<br />

I<br />

hand, (array *) is the set of all arrays whatsoever, including for example<br />

arrays that can hold only characters. (array character) is not a subset of<br />

(array t); the two sets are in fact disjoint because (array character) is not<br />

the set of all arrays that can hold characters, but rather the set of arrays<br />

that are specialized to hold precisely characters and no other objects. To<br />

test whether an array foo can hold a character, one should not use<br />

but rather<br />

Examples:<br />

(typep faa '(array character»<br />

(subtypep 'character (array-element-type faa»<br />

(setq example-array (make-array '(3) :fill-pointer 2»<br />

=> #<br />

(typep example-array 'array) => T<br />

(typep example-array 'simple-array) => NIL<br />

; simple arrays do not have fill-pointers.<br />

(<strong>zl</strong> :typep #*191) => :ARRAY<br />

(subtypep 'array t) => T and T<br />

(array-has-fill-pointer-p example-array) => T<br />

(arrayp example-array) => T<br />

(sys:type-arglist 'array)<br />

=> (&OPTIONAL (ELEMENT-TYPE '*) (DIMENSIONS '*» and T<br />

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

Lisp: Language Concepts.<br />

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

<strong>zl</strong>:array x type &rest dimlist Macro<br />

This creates an sys:art-q type array in sys:default-cons-area with the<br />

given dimensions. (That is, dimlists is given to <strong>zl</strong>:make-array as its first<br />

argument.) type is ignored. If x is nil, the array is returned; otherwise,<br />

the array is put in the function cell of symbol, and symbol is returned.<br />

This exists for Maclisp compatibility.<br />

We suggest using make-array in new programs.<br />

<strong>zl</strong>:*array x type &rest dimlist Function<br />

This is just like <strong>zl</strong>:array, except that all of the arguments are evaluated.<br />

It exists for Maclisp compatibility.

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

Saved successfully!

Ooh no, something went wrong!