On 4/10/2012 12:33 PM, Phil Smith wrote:
OK, Steve, here's the previous post...thanks again!

Umm... that doesn't show the COBOL call, nor the Assembler call
those are what I was wanting to see, to compare them to your
PL/I invocations


From: Phil Smith
Sent: Tuesday, April 10, 2012 9:00 AM
To: [email protected]
Subject: RE: Re: LE C calling HLASM

Steve Comstock wrote:
Ah, so that's what you want it for. But if the output buffer
length is zero, doesn't that tell you to use the input buffer?

And if an argument is omitted, it will appear as zero, right?
I mean, why else would you pass a buffer length of zero?

Because users make mistakes? I mean, we could do that, but it doesn't really 
solve the problem. We don't want to force them to type OMITTED - at that point 
they might as well code:
    rc = THEFUNCTION(inbuffer, inlength, inbuffer, inlength);

What we want is to allow both:
    rc = THEFUNCTION(inbuffer, inlength, outbuffer, outlength);
and
    rc = THEFUNCTION(inbuffer, inlength); /* Works same as if inbuffer/inlength 
specified again as 3rd&  4th parameters */

as we can in COBOL. Or even in C, for that matter. I still find it hard to 
believe that PL/I can't do this!

Remember that LIST seemed like the answer, except that the high bit never got 
set on the last parameter. And then LINKAGE(SYSTEM) seemed like the answer, 
except that you can't specify that on a function call.

...phsiii (will it go 'round in circles...?)

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN



--

Kind regards,

-Steve Comstock
The Trainer's Friend, Inc.

303-355-2752
http://www.trainersfriend.com

* To get a good Return on your Investment, first make an investment!
  + Training your people is an excellent investment

* Try our tool for calculating your Return On Investment
    for training dollars at
  http://www.trainersfriend.com/ROI/roi.html

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to