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

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


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

#define offsetof(type, member)  __offsetof(type, member)

#define __offsetof(type, field) ((size_t)(&((type *)0)->field))

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"?


More information about the fpc-pascal mailing list