Re: regex in C oder RPG




Lou schrieb:

> I am not thrilled about the way the sample code passes the regex_t data
> structure. They define the parameter it is passed in as passing by
> value, but use the %addr of the data strucure during the actual call. I
> would define a pointer to be passed by value and insert/extract the
> contents of the data structure into the pointer.
>
> I am not saying this is a problem or the cause of your problem. I have
> just had poor luck passing parameters by value using the %addr
> function.
>

I debug the rpg-program an see the data in regex_t is changed after the
first procedure regcomp is finished. So I think, the pointing ist
correct

> Does the person who posted this code say if it is tested and acutally
> works?
I have no contact to the person

>Can you run the sample as is?

I compiled without any erros. I run the sample with the string/pattern
of the example and other string/pattern-combinations. Everytime I got
the message: regexec() failed

Franz

.



Relevant Pages

  • Re: regex in C oder RPG
    ... I am not thrilled about the way the sample code passes the regex_t data ... They define the parameter it is passed in as passing by ... but use the %addr of the data strucure during the actual call. ... contents of the data structure into the pointer. ...
    (comp.sys.ibm.as400.misc)
  • RE: Get SelectedText from WebBrowser control
    ... use HtmlDocument.DomDocument property to get the unmanaged interface ... pointer for this HtmlDocument. ... Sample code like this: ... private string GetLastModifiedDate() ...
    (microsoft.public.dotnet.framework.windowsforms.controls)
  • Re: Invoking a function through function pointer
    ... > pointer to a function. ... I have a sample code, ... > void func(int x, int y) ...
    (comp.programming)
  • Re: ASP.NET - First, Previous, Next, Last record
    ... > Microsoft MVP ... > How do I move the pointer to the first record, previous record, next ... Some sample code would be appreciated. ...
    (microsoft.public.dotnet.framework.aspnet)