[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: wishes

From: Jürgen Kahrs
Subject: Re: wishes
Date: Mon, 07 Aug 2006 18:55:38 +0200
User-agent: Thunderbird (X11/20060527)

address@hidden wrote:

> 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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]