[DGD] getting started with DGD

Michael McKiel crashnbrn71 at yahoo.ca
Sat Mar 13 17:19:10 CET 2004


 --- Jeff Moore <jeff at procata.com> wrote: > 
> I found it.  Thanks.  I'm a bit surprised at how little DGD supplies in 
> terms of array and string manipulation.  I can understand leaving 
> things like inventory or player out of the driver, but I can hardly 
> think of a network application that doesn't need to slice and dice a 
> bunch of strings.
> 
> Doesn't pretty much every one end up having to write their own 
> proprietary string library?

I took some of Phantasmal's stringd.c, rewrote some,  and made it an
inheritable string.c as well I added things like substr() to it. Beyond that
I haven't had much need of string manipulation, that sscanf() and explode()
don't easily provide. 
A member_array() like Melville has in its auto object is a basic looping
array search thats easy to implement if you need the index placement of an
element in an array returned. Though right now I'm going with:

    nomask int member_(mixed *array, mixed element)
    {
	  return (sizeof(array & ({ element })) != 0);
    }
Which just returns 1, if an element exists in an array. else 0.

Though It would certainly be interesting to have some of Pike's sscanf
functionality :)
[ http://pike.ida.liu.se/generated/manual/modref/ex/predef_3A_3A/sscanf.html
]

Zam.

______________________________________________________________________ 
Post your free ad now! http://personals.yahoo.ca
_________________________________________________________________
List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list