[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: can a and d be the same for asort?
From: |
Wolfgang Laun |
Subject: |
Re: can a and d be the same for asort? |
Date: |
Mon, 5 Jul 2021 07:07:17 +0200 |
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
- can a and d be the same for asort?, Peng Yu, 2021/07/04
- Re: can a and d be the same for asort?, Andrew J. Schorr, 2021/07/05
- Re: can a and d be the same for asort?, Neil R. Ormos, 2021/07/05
- Re: can a and d be the same for asort?, Andrew J. Schorr, 2021/07/05
- Re: can a and d be the same for asort?, Wolfgang Laun, 2021/07/05
Re: can a and d be the same for asort?, arnold, 2021/07/06