[Gambas-devel] libnodave

Benoit Minisini gambas at ...1...
Tue Feb 22 11:51:31 CET 2005


On Friday 18 February 2005 18:19, Rob wrote:
> On Friday 18 February 2005 11:29, ariafrancesco at ...237... wrote:
> > There is nothing that can implement in Gambas the LibNoDave ??
> > http://sourceforge.net/projects/libnodave/
> > I think that whit it gambas can will be the most important
> > developed language in Industrial automation .
>
> This is the first I've heard of libnodave.  When I needed libpcre
> support in gambas, I brushed up on my C and implemented it
> myself.... maybe either you or someone else who works in
> industrial automation will have enough C skills and time to
> implement a gb.nodave component.
>
> Rob
>

This is not related to libnodave...

Rob, I see that code in the vb import add-on you did in the IDE:

STATIC PUBLIC FUNCTION match(subject AS String, pattern AS String) AS Boolean

  DIM r AS Regexp
  IF Not subject THEN RETURN FALSE
  IF Not pattern THEN RETURN FALSE
  r = NEW Regexp(subject, pattern)
  IF (r.Offset >= 0) THEN
    RETURN TRUE
  ELSE
    RETURN FALSE
  ENDIF

END

Can you add a class named "Matches" with a static "_call" method that 
implements the same behaviour ?

This way, for simple uses of RegExp, user will only have to call:

IF Matches("MyString", "MyPattern") THEN ...

What do you think about that ?

-- 
Benoit Minisini
mailto:gambas at ...1...




More information about the Devel mailing list