Basic constructor macro for char-array structures.
(make-char-array [:components <components>])
This is the usual way to construct char-array structures. It simply conses together a structure with the specified fields.
This macro generates a new char-array structure from scratch. See also change-char-array, which can "change" an existing structure, instead.
This is an ordinary
Macro:
(defmacro make-char-array (&rest args) (std::make-aggregate 'char-array args '((:components)) 'make-char-array nil))
Function:
(defun char-array (components) (declare (xargs :guard (char-value-listp components))) (declare (xargs :guard (< (len components) (expt 2 31)))) (let ((__function__ 'char-array)) (declare (ignorable __function__)) (b* ((components (mbe :logic (char-value-list-fix components) :exec components))) (let ((components (mbe :logic (if (< (len components) (expt 2 31)) components nil) :exec components))) (cons :char-array (list components))))))