bug-gawk
[Top][All Lists]
Advanced

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

Re: [bug-gawk] Feature suggestion - function abs(X)


From: arnold
Subject: Re: [bug-gawk] Feature suggestion - function abs(X)
Date: Mon, 01 Oct 2018 12:43:11 -0600
User-agent: Heirloom mailx 12.4 7/29/08

Hi.

Thanks for the suggestion.  I agree it'd be useful, but I don't
really wish to keep extending the gawk core. You can easily avoid
the need to keep retyping the function by putting it in a separate
file and setting the AWKPATH directory to include the directory
holding it. You can then either use an additional `-f abs.awk' on the
command line or

        @include "abs.awk"

in your awk programs.

Thanks,

Arnold

Peter Brooks <address@hidden> wrote:

> Please could I suggest the addition of the function abs(X) to gawk:
>
> function abs(X)
>         {
>         if ( X < 0 ) X = -X;
>         return X;
>         }
>
> It would be handy, I so often find I have to enter the above function by hand.
> -- 
> Peter Brooks
>
> Mobile: +27 82 717 6404
> Skype:  Fustbariclation
> Twitter: Fustbariclation
> Google+: Fustbariclation
> Author Page: amazon.com/author/peter_brooks



reply via email to

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