www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/09/29/02:05:27

From: Radical DOT NetSurfer AT delorie DOT com
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Please add strrev proposal
Date: Sat, 29 Sep 2001 00:32:11 -0400
Organization: Posted via Supernews, http://www.supernews.com
Message-ID: <9ljart04o115f88rkara1m09u5vctv484i@4ax.com>
References: <lcq8rtk1nqua2hc6rqfhmqisbd587n8t2n AT 4ax DOT com> <Xns912A8823C1399ASINANUNUR AT 132 DOT 236 DOT 56 DOT 8> <3BB50884 DOT 347A4384 AT yahoo DOT com> <Xns912AD5B54F1C7ASINANUNUR AT 132 DOT 236 DOT 56 DOT 8>
X-Newsreader: Forte Agent 1.8/32.548
MIME-Version: 1.0
X-Complaints-To: newsabuse AT supernews DOT com
Lines: 41
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

What ever happened to the earlier comment...

<start_quote>
anyway, i think this is going to be my last post on the topic.

sinan.
-- 
--------------------------------
A. Sinan Unur
http://www.unur.com/
<end_quote>

On 29 Sep 2001 01:00:32 GMT, "A. Sinan Unur" <asu1 AT cornell DOT edu> wrote:

>CBFalconer <cbfalconer AT yahoo DOT com> wrote in
>news:3BB50884 DOT 347A4384 AT yahoo DOT com: 
>
>> Thank you.  I knew there was a reason I made my equivalent
>> (revstring) a void function.  I just didn't know what it was :-)
>
>The usefulness of a strrev function depends very much on what you intend to 
>use it for. For example, if your program is looking for palindromes, you 
>might want to use something like:
>
>strcmp(word, strrev(word));
>
>i which case the in-place nature of the proposed function is really not 
>helpful. on the other hand, if one wants to use strrev this way, there are 
>other issues such as: where did the string returned by strrev come from 
>(similar to strdup). if the memory was allocated dynamically, the caller 
>needs to remember to free it. can strrev return NULL? if it is allocated 
>statically, the function is not thread-safe so on and so forth.
>
>the proposed in-place strrev would address a very narrow issue, and provide 
>a solution to only a very small number of problems. hence, my belief that 
>it is better for programmers to implement their specific solution.
>
>Of course, it is only my opinion.
>
>Sinan.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019