[fpc-pascal] offsetof()-macro in pascal

Marc Santhoff M.Santhoff at t-online.de
Mon Sep 18 00:13:22 CEST 2006


Hi,

I'd like to know if there is something similar to this:

<stddef.h>
#define offsetof(type, member)  __offsetof(type, member)
</sdtdef.h>

<ansi.h>
#define __offsetof(type, field) ((size_t)(&((type *)0)->field))
</ansi.h>

predefined in pascal or a translation of it.

Is it possible to have this defined generically like the macro or does
it need to be one definition for each "type"?

TIA,
Marc





More information about the fpc-pascal mailing list