i think the documentation for APIs as a whole could be better but i agree
char(*) just doesn't lend itself well to this. seems it would be better
if the documentation simply stated "variable char"
Thanks,
Tommy Holden
"Wilt, Charles" <WiltC@xxxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
08/08/2007 02:14 PM
Please respond to
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>
To
"RPG programming on the AS400 / iSeries" <rpg400-l@xxxxxxxxxxxx>
cc
Subject
RE: Help with QSYCUSRA API - Check User Authority
-----Original Message-----
From: rpg400-l-bounces+wiltc=cintas.com@xxxxxxxxxxxx
[mailto:rpg400-l-bounces+wiltc=cintas.com@xxxxxxxxxxxx] On
Behalf Of Barbara Morris
Sent: Wednesday, August 08, 2007 12:56 PM
To: rpg400-l@xxxxxxxxxxxx
Subject: Re: Help with QSYCUSRA API - Check User Authority
Charles, you can't pass a parameter by value to a program.
Ay-ya-eye...<slapping forehead)
You caught me Barbara. Completely slipped my mind that we we're calling
an external program.
Out of curiosity, why the limitation in the RPG compiler? Just to protect
us from ourselves or some
other reason? The same data would be pushed onto the stack, so it would
seem that the compiler could
allow a pointer by value parameter if it wanted to. Not that I can think
of a good reason to do it
that way ;-)
Couldn't you do it with a C program?
But aside from that, "CHAR(*)" isn't a pointer any more than
"BIN(4)" is a pointer. Sometimes CHAR(*) is used to describe
a subfield, and if you code a pointer subfield, it's completely wrong.
Good point, but I think I'd argue char(*) means one thing in a parameter
list and another in data
structure. Perhaps even char(*) could have a couple of meanings even in a
parameter list.
But maybe I'm over thinking it, thinking too much about what's going on
behind the scenes instead of
up front. Just seems wrong to me to say char(*) isn't a pointer....
Charles
This e-mail transmission contains information that is intended to be
confidential and privileged. If you receive this e-mail and you are not a
named addressee you are hereby notified that you are not authorized to
read, print, retain, copy or disseminate this communication without the
consent of the sender and that doing so is prohibited and may be unlawful.
Please reply to the message immediately by informing the sender that the
message was misdirected. After replying, please delete and otherwise
erase it and any attachments from your computer system. Your assistance
in correcting this error is appreciated.
As an Amazon Associate we earn from qualifying purchases.