<HTML><HEAD></HEAD>
<BODY dir=ltr>
<DIV dir=ltr>
<DIV style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt">
<DIV>
<DIV>I had to convert "void test( void *data)" to Delphi/Pascal.</DIV>
<DIV> </DIV>
<DIV></DIV>
<DIV>My first conversion was:</DIV>
<DIV> </DIV>
<DIV></DIV>
<DIV>procedure test( data : pointer );</DIV>
<DIV> </DIV>
<DIV></DIV>
<DIV>The documentation of the test function seems to indicate that this function
returns all kinds of pointers, so it's like a call by reference call.</DIV>
<DIV> </DIV>
<DIV></DIV>
<DIV>So I am starting to wonder if I perhaps should change it to something more
convenient like:</DIV>
<DIV> </DIV>
<DIV></DIV>
<DIV>procedure test( var data );</DIV>
<DIV> </DIV>
<DIV></DIV>
<DIV>I was trying out c/c++ to see if void test( void &data ) would be
valid/legal but to my surprise it was not (visual studio 2010).</DIV>
<DIV> </DIV>
<DIV></DIV>
<DIV>So now I am wondering if it's safe to convert:</DIV>
<DIV> </DIV>
<DIV></DIV>
<DIV>void test( void *data ) </DIV>
<DIV> </DIV>
<DIV></DIV>
<DIV>to</DIV>
<DIV> </DIV>
<DIV></DIV>
<DIV>procedure test( var data );</DIV>
<DIV> </DIV>
<DIV></DIV>
<DIV>I don't want no strange stack problems or access violations or anything
like that, so I have to make sure it's 100% the same and safe ?!?</DIV>
<DIV> </DIV>
<DIV></DIV>
<DIV>The convenience would be nice to have though...</DIV>
<DIV> </DIV>
<DIV>My thoughts on the c/c++ inconsistency:</DIV>
<DIV> </DIV>
<DIV>Prototypes for routines:</DIV>
<DIV> </DIV>
<DIV>1: void test(void *data)<BR>2: void test(void &data)</DIV>
<DIV> </DIV>
<DIV>The first one does compile in visual studio 2010 and the second does
not.</DIV>
<DIV> </DIV>
<DIV>They both seem conceptually the same, like untyped variable data in Delphi,
<BR>yet the first one is allowed and the second is not allowed.</DIV>
<DIV> </DIV>
<DIV>Isn't that strange ?! ;) :)</DIV>
<DIV> </DIV>
<DIV>Seems like case 2 is not yet implemented, either in the c/c++ language
rules <BR>or in the compiler ?! ;)<BR></DIV>
<DIV></DIV>
<DIV>Bye,</DIV>
<DIV> Skybuck.</DIV></DIV></DIV></DIV></BODY></HTML>