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



Hi Otto,

> D String...
> d                 PR              O   extproc( *JAVA
> d                                            : 'java.lang.String'
> d                                            : *CONSTRUCTOR)
> d  chars                     65535A   varying
> d                                     options(*VARSIZE)
> d                                     const
[SNIP]
> If I understand RPG Reference manual correctly RPG compilator generates
> a temporary for the literal that further passes to the method. What is
> the format of the temporary? Is the format 65535A (and varying ?) which
> would be rather unpleasant of the compiler, or 5A (and varying ?) which
> would be nice I suppose ??

Because yu included "options(*varsize)" it should generate a "5A varying"
temp field.  If you had excluded the "options(*varsize)" it would've used
65535A instead.  At least, that's how I understand it.

Unless the fact that you're calling Java causes it to be treated
differently?  But I doubt it.

Another copy of the data is probably created in ASCII in order to pass it
off to Java -- but that data is most likely also going to be a 5
characters long.

> I am just deducing using information in RPG manuals; maybe I got lost in
> my deductions. The prototypes I found on the web vary in both the length
> of char parameter and the applied keywords.

I don't think the actual JVM knows what length you put on your prototype,
so I don't think it matters much, as long as you give the maximum length
that you're intending to use.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.