[Top][All Lists]

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

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

From: Andrew J. Schorr
Subject: Re: can a and d be the same for asort?
Date: Mon, 5 Jul 2021 12:53:49 -0400
User-agent: Mutt/1.5.21 (2010-09-15)

I truly do not understand your point. If you supply a and d with the same
value, it's just the same as not supplying d at all. Why is this an interesting
case? You are free to do it or not; it doesn't matter. It should be immediately
obvious to a thinking programmer that it's a silly and pointless usage case. If
you think the documentation should be enhanced, please supply a proposed patch.


On Sun, Jul 04, 2021 at 04:28:05PM -0500, Peng Yu 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

reply via email to

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