bug-gawk
[Top][All Lists]
Advanced

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

Re: can a and d be the same for asort?


From: Peng Yu
Subject: Re: can a and d be the same for asort?
Date: Mon, 5 Jul 2021 08:51:04 -0500

The ambiguity is not defined by the authors. It is defined by the readers.

On 7/5/21, Wolfgang Laun <wolfgang.laun@gmail.com> wrote:
> One has to be grateful to manual authors who do not waste their and our
> time elaborating on elementary consequences of the statements they write. I
> can't see any ambiguity or elision in the explanation of *asort.* Calling
> the function with the same array for parameters #1 and #2 is quite clear by
> reading the definition, mentally replacing *dest *by *source.*
>
> -W
>
>
> On Mon, 5 Jul 2021 at 03:13, Peng Yu <pengyu.ut@gmail.com> wrote:
>
>> Since the manual does not say a and d can be the same or not, to be
>> complete, it should be clearly documented that they should not be the
>> same.
>>
>> For example, man strcpy made it clear when such ambiguity occurs.
>>
>> https://man7.org/linux/man-pages/man3/strcpy.3.html
>>
>> "The strings may not overlap, and the destination string dest must be
>> large enough to receive the copy."
>>
>> > It's OK, but why is it useful and worth documenting?
>> > What's the benefit of supplying a 2nd argument equal
>> > to the 1st argument?
>>
>> I don't know if there is any benefit. That is why I think this should
>> be documented.
>>
>> --
>> Regards,
>> Peng
>>
>>
>
> --
> Wolfgang Laun
>


-- 
Regards,
Peng



reply via email to

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