Hi all,

Again I would like to ask some support on a piece C code that I need to
translate to pascal. The code in question is:

#define MEMNEXT(x) ((MyStruct *)(((char *) x) - ((char *) & (((MyStruct
*)0)->next))))

What exactly is going on here? Where does the result point to? It seems
like it starts with the pointer x and subtracts the size of the offset
of the beginning of MyStruct up to the "next" variable. At least that's
what I think is happening.

Does anyone has an idea how to translate this into working pascal code?

TIA!

Rgds, Darius
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to