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



It's simpler than you would think. An array in RPG is defined using the DIM
keyword, so you just add the same keyword to the prototype. You do have to
define the length of the array in RPG, which can cause some issues when java
is expecting to receive the exact number of elements filled instead of
receiving blank elements in the array.

Your prototype would look something like: (forgive the fixed form)

d addConditionalFormatting...
d pr like(jint)
d EXTPROC(*JAVA:
d 'MyClass.addConditionalFormatting':
d 'close')
d prRegions like(CellRangeAddress) dim(5)
d prRule like(ConditionalFormattingRule)


date: Thu, 17 Dec 2015 15:06:55 -0500
from: "Mark Murphy/STAR BASE Consulting Inc."
<mmurphy@xxxxxxxxxxxxxxx>
subject: How to define a java array in RPG

I cross posted this in the Midrange, RPG, and Java lists because Java
doesn't get much traffic. Answer wherever you feel is most appropriate.

I need to call a java method with the following signature:

int addConditionalFormatting(CellRangeAddress[] regions,
ConditionalFormattingRule rule)

How do I (or maybe more appropriately, can I) write a prototype in RPG for
the first parameter which is an array?

Mark Murphy
STAR BASE Consulting, Inc.
mmurphy@xxxxxxxxxxxxxxx






As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.