That does make some sense (the bit about convincing the compiler that a
parameter is a pointer).  Thanks for the tip.

Peter

-----Original Message-----
From: Julian Levens [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 09, 2005 4:59 AM
To: [email protected]
Subject: Re: z/OS C: VL=1 for parameter lists?


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

_
This message and any attachments are intended only for the use of the addressee 
and
may contain information that is privileged and confidential. If the reader of 
the 
message is not the intended recipient or an authorized representative of the
intended recipient, you are hereby notified that any dissemination of this
communication is strictly prohibited. If you have received this communication in
error, please notify us immediately by e-mail and delete the message and any
attachments from your system.

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

Reply via email to