RE: strtok

new topic     » topic index » view thread      » older message » newer message

Christian.CUVIER at agriculture.gouv.fr wrote:
> 
> Actually, this answers another recent post about strtok.
> Why don't these generic text/sequence handling routines get too 
> much attention? I think EuRegExp got even less feedback.
> My tentative answer is: actually, these routines are very powerful, 
> since you can do about everything with them putting the right 
> params in it. And most people, including myself, find it easier to 
> code their own stuff for the specific need they have.
> 
> For instance: I needed to separate off the args of a generic 
> routine call. Including ugly things like:
> 
> MyProc({3,5,s2},sort(f(x,y)),(x=0))

<snip>

> Could I do it using strtok? Likely, given its genericity and sheer 
> power, but for this I'd need to study the docs to find the right 
> combination, and possibly have to understand your code. That's an 
> overhead compared to writing my own routines (they didn't take too 
> long to debug).

This is a great point.  I've used strtok a fair amount (and sent some 
MicroEconomy money its way) for some simple tasks like reading tab 
delimited files, but not so much for parsing and demangling more complex 
things.

In a more general sense, whenever I start a new project, I find myself 
going to the archives to see what's there, and often find something to 
reuse.  If I find something (and it's usually something that's been 
there for a long time) I tend to include it in my next MicroEconomy post 
to Rob.  

Matt Lewis

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu