[DGD] sscanf

Erwin Harte harte at xs4all.nl
Fri Dec 7 03:13:46 CET 2001


On Thu, Dec 06, 2001 at 07:01:07PM -0600, David Jackson wrote:
> At 10:45 AM 12/6/2001 -0800, you wrote:
[...]
> >string *arr;
> >
> >arr = explode(source, " ");
> >
> >That should break the sentence into an array of words.
> 
> Yeah, but with a do-while loop you can call other functions to do further 
> processing...

<sigh>
Why do you people insist on writing something in reply and quoting the
entire original message, including lots of irrelevant bits like the
automatically added mailinglist footer (several times), _after_ your
comments, so that you end up scrolling back and forth to see what you
are actually commenting on?

Do you also read books starting at the end?
</sigh>

Anyway, what makes you think you couldn't call other functions to do
further processing on the words you found when using explode()?

    int i, sz;
    string *str;

    str = explode(line, " ");
    for (i = 0, sz = sizeof(str); i < sz; i++) {
        do_something_with(str[i]);
    }

Voila,

Erwin.
-- 
Erwin Harte <harte at xs4all.nl>
_________________________________________________________________
List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list