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



RNewton@xxxxxxxxxxxx wrote:

I'm having trouble getting Regexec() to compile in my program. I'm using
the example regex_h that Scott put out a couple years ago.
<snip>
The compiler error...

*RNF7542 30 001060 Parameter 4 is not valid as a parameter passed
by
reference.

*RNF7542 30 1 Parameter cannot be passed by reference when it can be
changed during the call.

Here is what I have...

d buffer s 1000a inz
d pattern s 512a inz('(?:\s+)(?:#)\s{0,5}([0-9a-z]+)')
d reg ds likeds(regex_t)
d numMatches s 10u 0 inz(100)
d matches ds likeds(regmatch_t) dim(100)
d rc s 10i 0
d len s 5u 0 inz
d foundWord s 100a inz
<snip>
//Execute the regular expression to find pattern matches
rc = regexec(reg :%trim(buffer) :numMatches :matches :0);

Robert:

You described a little of what you're doing, showed the error messages, provided the variable definitions and showed the function as used in your program.

The biggest thing missing is the prototype itself, which is perhaps the only part of the program we need to see.

Can you post the prototype, please?

Tom Liotta


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.