<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body style='font-size: 10pt; font-family: Arial,Helvetica,sans-serif'>
<div>Hi all,<br /><br />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:<br /><br />#define MEMNEXT(x) ((MyStruct *)(((char *) x) - ((char *) & (((<span style="display: inline !important; float: none; background-color: transparent; color: #000000; font-family: Arial,Helvetica,sans-serif; font-size: 13.33px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;">MyStruct </span>*)0)->next))))<br /><br />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.<br /><br />Does anyone has an idea how to translate this into working pascal code?<br /><br />TIA!<br /><br />Rgds, Darius</div>
</body></html>