Help with Lisp type system
- From: wrf3@xxxxxxxxxxxxxxx (Bob Felts)
- Date: Fri, 5 Dec 2008 13:04:17 -0500
Given +foo+ and +bar+ (2 constants, value not really important here),
I'd like to make an unsigned-byte 8 sequence containing these two
values. The brute force way:
(let ((blob (make-array 2 :element-type '(unsigned-byte 8))))
(setf (aref blob 0) +foo+)
(setf (aref blob 1) +bar+)
blob))
But surely I ought to be able to use :initial-contents to populate the
array. I just haven't been able to find the right incantation that
makes everyone happy.
Any help appreciated.
.
- Follow-Ups:
- Re: Help with Lisp type system
- From: Andy Chambers
- Re: Help with Lisp type system
- From: Alberto Riva
- Re: Help with Lisp type system
- From: Thomas M. Hermann
- Re: Help with Lisp type system
- Prev by Date: Re: Introductions to the Metaobject Protocol
- Next by Date: Re: Help with Lisp type system
- Previous by thread: how to undefine structure and replace it with a class of the same name?
- Next by thread: Re: Help with Lisp type system
- Index(es):
Relevant Pages
|