[DGD]Need tips with LPC function Im writing.

Frank Schmidt franks at colargol.tihlde.hist.no
Wed Mar 24 08:37:59 CET 1999



On Mon, 22 Mar 1999 sampsa at netsonic.fi wrote:

> 
> 
> On Mon, 22 Mar 1999, Frank Schmidt wrote:
> 
> > > > type of function.  ie. since you dont have strstr() and similar,
> 
>  Umm, we actually have strstr() and strchr() kfuns. We also have
> new_string(int lenght, int fillchar) and break_string() kfuns with color
> support, because I use these a lot.

That's one way to go. I've chosen to stay away from patching the driver as
much as possible.

>  Can you tell me where to find this, I would like to take a look on it?

You'll find the latest version in
http://www.colargol.tihlde.hist.no/~franks/downloads/
But I must warn you that the package is not finished yet, and cannot be
until DGD supports a way of identifying unspecified (default) parameters
to functions..

>  As does explode(find+str+find,find), extra separator to both ends of
> string to nullify effect of stripping in kfun? This is also done in 2.4.5
> simulation library.

It's been a while since I messed around with explode/implode in DGD, and I
don't have it available right yet. But from what I can recall adding
separators at the beginning and end of the string didn't work with strings
consisting of only separators, ie. implode(explode("1"+"1111"+"1", "1"),
"1"). But don't take my word for it, I need to test it when I get back in
DGD again..
Or if I remember even more correctly, maybe it did work for that instance,
but I made those explode/implode versions to use in other parsing too,
like word-wrapping. And needed the functions to return a bit more "saner"
results, not just results that implode worked reversibly correct on.

-Frank


List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list