[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: sizeof
- To: robby+@CMU.EDU
- Subject: Re: sizeof
- From: "Mark A. Tapia" <markt@dgp.toronto.edu>
- Date: Mon, 10 Jan 1994 14:21:30 -0500
- Cc: info-mcl@cambridge.apple.com
In various postings Robby Findler asks about the lisp equivalent
of the c sizeof function.
Here's the example used:
> (make-record :ColorTable :storage :Handle
> :length (+ (sizeof :ColorTable)
> (* num-colors (sizeof :ColorSpec))))
The "record-length" function is the lisp replacement of the
c sizeof function.
For examples:
(record-length :TPrint)
returns the size of the :tPrint record or 120.
The following creates a handle to a tPrint record:
(setq view-print-record (require-trap #_NewHandle :errchk (record-length
:TPrint)))
mark