× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Certainly a matter of taste, but as char(8) indicates a 8 byte character
field, char(20) a 20 byte character field, and binary(4) a 4 byte binary
field then char(*) to represent an unknown/variable number of bytes
character (or hex if you will to accomodate data structures) field doesn't
seem too out of line (to me anyway).

If it weren't for C's use of * for a pointer (and this API convention was
started in V1R3, long before ILE C was available -- though I don't recall
off hand what release EPM System C came out) and RPG's subsequent use of
the * convention, then this probably wouldn't be such a point of
confusion.

Bruce




Tommy.Holden@xxxxxxxxxxxxxxxxxxxxx
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
08/08/2007 02:36 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






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.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.