Previous mail
Next mail
Unformatted/full headers
Overview 10 days
Subject
Date
Thread
Author
From: Frank Heckenbach
Subject: Sizeof variant records
Date: 27 Mar 2006, 12:17:01
Angelo.Fumagalli@alcatel.it wrote: > How can I have the true "sizeof" of variant records? Gpc sizeof accepts > only one parameter as type or variable so isn't possible to specify tags > parameters for example: > > I tried to use the new statement instead, e.g. > but in both cases sizeof return the same value that is the maximum record > size. In GPC that's the "true" size. GPC always allocates the maximum size. I don't know what you plan to do, but if you're trying to allocate less manually with GetMem etc., that would be dangerous, as assignments can overwrite the "full" size. If you want to store/load variant parts to/from files, you might better do so fieldwise anyway, for the usual reasons such as padding. If you need a data structure that allows allocating different amounts of memory, you could look at objects. Frank
Previous mail
Next mail
Unformatted/full headers
Overview 10 days
Subject
Date
Thread
Author
| Author | Subject | Date |
|---|---|---|
| Waldek Hebisch | gcc-3.4.6 | 15 Mar 2006, 11:45:27 |
| Angelo.Fumagalli@alcatel.it | Sizeof variant records | 27 Mar 2006, 11:40:29 |
Note: This page contains information that does not originate from the owner of this web site, but from the authors of the mails archived. The owner of this web site is not responsible for the content of such information. Any use of that infomation requires the consent of the respective author.
Where WWW addresses (URLs) in the mails archived are marked as hyperlinks, this is only for the comfort of the reader. The content of the web pages linked to like this does not necessarily reflect the opinion of the owner of this web site or of the authors of the mails archived. The owner of this web site is not responsible for the content of such web pages. Those pages are explicitly not to be considered as part of the content of this page, but merely as references.
This page was created by Crystal 0.999 (Linux 2.4.27/i686).