Peter As you say the manuals are not very clear. I struggled for a long time to use IRXEXCOM, the problem was that parameters 2 and 3 have to point to the same address (even though not used). I was passing 0 (zero) for both of them, after all thats the same address. However, as you say the compiler recognises this as pass by value and create two seperate copies and passes the address of these - hence different addresses and the call fails. By changing my code to pass NULL which is defined as ((void *)0), the compiler gets the hint that its a pointer and passes it through as is. Basically, according to my experiments if you convince the compiler your are passing a pointer its passed thru directly, otherwise a copy is made etc. In fact, when I thought about it, it does seem to be an intelligent way of handling the issue. However, the documentation ...
HTH Julian > In my specific case I am passing "&p1, &p2, ..." deliberately. I will try > removing the "&" operator and see what is generated... > > OK, tried that and without a "&" operator the generated code passes the > address of a COPY of the value of the variable. So, the parameter list is > addresses, but NOT the address of the actual variable, only a COPY of the > value, at least for scalar variables. String parameters (char *) > specifically declared in the function declaration are passed the actual > variable address. Don't know yet how "struct" or "union" > parameters will be > passed, still experimenting with those. > > The manuals really ought to make these rules clearer. I need to > RTFM in the > C/C++ language reference manual again to see if I can find a better > description of what should be generated in each case. > > Peter > > ***** Matchcode International awarded the "Best International Product" by Direct Marketing Business at the IDMF 2003 ***** ******************************************************************* This e-mail is confidential and intended solely for the use of the individual to whom it was addressed. If you are not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this message is strictly prohibited. Please delete any copies you may have, on any computer. Any views expressed in this message are those of the individual sender and do not necessarily represent the views of Capscan Ltd and/or its subsidiaries. Please be aware that Internet communications are not secure. Capscan Limited Head Office: Capscan Limited Grand Union House 20 Kentish Town Road London NW1 9BB Registered in England no. 1183941 ******************************************************************* ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html