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



-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of Hans Boldt
Sent: Wednesday, October 01, 2003 10:33 AM
To: rpg400-l@xxxxxxxxxxxx
Subject: Re: calling c++ class member function from rpg


>Steve Richter wrote:
>> I have a number of C++ classes that handle strings ( basic strings,
command
>> strings, comma sep value strings, ... ).  Nothing platform specific at
all.
>> ...

>Hmmm, If you need to handle CSV files in RPG, I believe Bob Cozzi
>will soon have a version of his "RPG ToolKit for OS/400" with CSV
>functionality. It might be worth waiting a week or so for that
>instead of duplicating the effort yourself (and risk getting it
>wrong). Check out <http://www.rpgiv.com/toolkit/>.

But C++ is a lot of fun to code in and my CsvString class in c++ is portable
to Linux and Windows.

By adding overloads of the << and [] operators, the C++ code that uses the
CsvString class is as readable as it can be:
   CsvString  args ;       // a comma separated value string.
   string   sVlu1, sVlu2 ; // two plain ol strings.
   args << sVlu1  ;        // add a value to end of CSV string.
   sVlu2 = args[n] ;       // get the n'th CSV string element.

I like RPG, I just dont follow why IBM AS400 has never cared for C++.

As far as calling C++ member functions from RPG, is there more to calling
such a function than just adding the implicit "this" pointer?  I am curious
why this was left out of ILE.

thanks,

-Steve



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.