[Top][All Lists]

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


From: Aharon Robbins
Subject: Re: WHINY_USERS=0
Date: Sun, 25 Oct 2009 22:06:54 +0200

Greetings. Re this:

> Date: Fri, 23 Oct 2009 19:41:26 +0200
> From: Hermann Peifer <address@hidden>
> To: address@hidden
> CC: address@hidden
> Subject: WHINY_USERS=0
> I was making some WHINY_USERS performance tests, following the example
> at http://awk.info/?tip/whinyUsers
> It looks to me that not only WHINY_USERS=1, but also WHINY_USERS=0 or
> even WHINY_USERS=  are leading to sorted processing of arrays. I have
> to actually unset WHINY_USERS in order to get back to default array
> processing. The corresponding test in AWK source code (main.c) is:
>       if (getenv("WHINY_USERS") != NULL)
>               whiny_users = TRUE;
> I am wondering if this is rather a feature or something else?
> Regards, Hermann

It's what programmer types call an "easter egg", meaning an undocumented
feature with unusual or interesting behavior, and I intend to keep it
that way (but see the gawk.texi file :-).

The feature as coded means "if WHINY_USERS exists in the environment,
enable the whiny user related features." (There are at least two.)

So, the behavior you're seeing is what I wanted.  I don't intend to
change it.

Personally, I think you should use asort or asorti if you want array
sorting. The code is much clearer that way.



reply via email to

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