17.05.2015 Views

zl:1 - FTP

zl:1 - FTP

zl:1 - FTP

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

35 sys:array-row-span<br />

;;; -*- Syntax: Zetalisp; Package: USER; Base: 10; Hade: LISP -*­<br />

(setq big-array (make-array '(1024 1024) :type 'art-q<br />

:initial-value 0»<br />

(setq window (make-array '(512 512) :type 'art-q<br />

:displaced-to big-array<br />

:displaced-index-offset<br />

(array-row-major-index big-array 256 256)<br />

:displaced-conformally t»<br />

For a one-dimensional array, the result of array-row-major-index equals<br />

the supplied subscript.<br />

An error is signalled if some subscript is not valid.<br />

array-row-major-index can be used with the :displaced-index-offset option<br />

of make-array to construct the desired value for multidimensional arrays.<br />

I<br />

sys:array-row-span array Function<br />

sys:array-row-span, given a two-dimensional array, returns the number of<br />

array elements spanned by one of its rows. Normally, this is just equal to<br />

the length of a row (that is, the number of columns), but for conformally<br />

displaced arrays, the length and the span are not equal.<br />

(sys:array-row-span (make-array '(4 5») => 5<br />

(sys:array-row-span (make-array '(4 5)<br />

:displaced-to (make-array '(8 9»<br />

:displaced-conformally t»<br />

=> 9<br />

Note: if the array is conceptually a raster, it is better to use<br />

decode-raster-array instead of sys:array-row-span<br />

array-total-size array Function<br />

Returns the total number of elements in array. The total size of a onedimensional<br />

array is calculated without regard for any fill pointer.<br />

(array-total-size (make-array '(3 5 2») => 30<br />

Note that if fill pointers are being used and you want to know the active<br />

length of the array, you should use length or <strong>zl</strong>:array-active-Iength.<br />

array-total-size does not return the same value as the product of the<br />

dimensions for conformal arrays.<br />

array-total-size-limit<br />

Constant<br />

Represents the exclusive upper bound on the number of elements of an array.<br />

The value of this is 134217728.

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

Saved successfully!

Ooh no, something went wrong!