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



Does it really have the same name as the IBM-supplied API? If so, the
ramifications of that are pretty far reaching, including the fact that one
couldn't merge new modules with existing, if the existing already use the
IBM variety and the new don't.

I ran into this with (I think it was) the easy400 mmail program. Great
tool, but I ended up having to abandon it because it used a generic name for
executing commands (exccmd or docmd, as I recall), and that conflicted with
hundreds of other (existing) modules that we wanted to merge with mail
functions. (The procedure definitions conflicted in some forgotten manner.)

Dennis Lovelady
http://www.linkedin.com/in/dennislovelady
--
"... Man had always assumed that he was more intelligent than dolphins
because he had achieved so much... the wheel, New York, wars, and so on,
whilst all the dolphins had ever done was muck about in the water having a
good time. But conversely the dolphins believed themselves to be more
intelligent than man for precisely the same reasons."
-- The Hitchhiker's Guide to the Galaxy


I like the look of it, but I have a couple of 'concerns'.

1. Could you implement it so that you don't need to explicitly pass the
terminating null character? Easy to check within your REGEXP procedure,
and
means that RPG programmers won't have to mess around themselves.

2. Following on from Dennis's concern(s), could you pass an (optional)
final
parameter to say wheter you want to perform REGFREE? Then, REGEXP can
check
whetherthe regexp has changed since the last time (and perform REGCOMP
if
necessary), and only do REGFREE if specified (or when the ActGrp ends,
of
course):


H bnddir('QC2LE')

D intotest s 256
D inpattern s 256

d regexp pr 10i 0 extproc('regexp')
d xtotest * value options(*string)
d xpattern * value options(*string)
d regfree 10i 0 options(*nopass)

d xreturn s 10i 0
d totest s like(intotest)
d totestptr s * inz(%addr(totest))
d pattern s like(inpattern)
d patternptr s * inz(%addr(pattern))

d cnull c x'00'
d REGFREE c 0


/free

intotest = 'myname@xxxxxxxxxxxxxxxx';
inpattern = '\w+@\w+\.\w{2,3}$';

totest = %trim(intotest);
pattern = %trim(inpattern);

xreturn = regexp (totestptr: patternptr: REGFREE);

dsply xreturn;

*inlr = *on;

/end-free


Just a thought (or two)

Rory

p.s. I still really like it. Don't think that these are all negatives -
just
observations...



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.