[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Mon, 07 Aug 2006 18:55:38 +0200
Thunderbird 188.8.131.52 (X11/20060527)
> Could you implement e.g. a min() and max() function. Ideally these should
> accept arbitrary
> numbers of input arguments. I.e.
> min($1, $2)
> min($1, $3, $4, $5)
> and so on should be possible.
Yes, min() and max() are functions that I also need
again and again. The same is true for abs(), sgn()
and some rounding functions.
The current trend towards new functions in gawk goes
like this: Encapsulate them, either in a library of
scripts (use the @include mechanism of igawk), or
write your own gawk extension. Gawk extensions are a
mechanism for dynamic loading of libraries. Only a
very few are available at the moment.
For use in my own scripts, I implemented a Gawk extension
for using the MPFR library:
Multiple precision arithmetic may be a bit of an
overkill if it is just min() and max() that you need.
On the other hand, this MPFR library is already
available with the xgawk distribution:
> P.S. I wonder if anybody will ever read this mail?
You only have to read this newsgroup to find out.
- wishes, frank . koster, 2006/08/07
- Re: wishes,
Jürgen Kahrs <=
- Re: wishes, Aharon Robbins, 2006/08/07