|
On Friday 19 April 2002 6:25 pm, James Rich wrote: > On Fri, 19 Apr 2002 boldt@ca.ibm.com wrote: > > But since this is Friday, I thought I'd be a trouble-maker > > and provide a solution in Python instead: :-) ;-) :-) > > > > -------------------------------------------- > > # Print words of string: > > str = 'This is a test. And so is this.' > > for word in str.split(): > > print "string:\t", word > > -------------------------------------------- > > Oh boy - I *have* to get python going on my system! But can I call a > python function from an RPG module? > > James Rich > james@eaerich.com James If all you're after is some RPG code to split strings into words I've got some code in my utilities to do it. There's a word wrap routine in there as well - pass n lines of x long and get back the lines reformatted to y long. Would they be of any use? Admittedly Python looks a *lot* better, but I've not yet got beyond 'Hello world' with it yet ;-) Regards, Martin -- martin@dbg400.net jamaro@firstlinux.net http://www.dbg400.net /"\ DBG/400 - DataBase Generation utilities - AS/400 / iSeries Open \ / Source free test environment tools and others (file/spool/misc) X [this space for hire] ASCII Ribbon Campaign against HTML mail & news / \
As an Amazon Associate we earn from qualifying purchases.
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.