Email address obfuscation in effect -- please
click here to turn it off.
[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
On Tuesday 07 October 2003 11:14 am, Mike Miller wrote:
> On Tue, 7 Oct 2003, mehmood hasan wrote:
> > I want to count No. of filled fields in any row
> > i am seeking a query that returns me the number of filled fields in a
> > row; any one can help me
>
> It depends on the delimiter. If the delimiter is white space (spaces and
> tabs), then gawk will do it well (except that it ignores initial white
> space, but that's often a good thing). I'm assuming you have a text file.
> You do this:
i'm guessing these fields are in an array or vector or some sort of list and
then you can just use a loop and go through the array and count the number of
entries, if not then you could use a StringTokenizer and create tokens of
each field by however you seperate the fields using that as your delimiter,
such as a white space, comma or whatever.
Chad Whiting
Student Programmer
_______________________________________________
members mailing list
EMAIL:PROTECTED
http://mlug.missouri.edu/mailman/listinfo/members