Deutsch   English   Français   Italiano  
<vrdkcb$4n2o$2@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: Richard Heathfield <rjh@cpax.org.uk>
Newsgroups: comp.lang.c
Subject: Re: Suggested method for returning a string from a C program?
Date: Wed, 19 Mar 2025 05:23:23 +0000
Organization: Fix this later
Lines: 36
Message-ID: <vrdkcb$4n2o$2@dont-email.me>
References: <vrd77d$3nvtf$2@dont-email.me>
 <87a59hvgyk.fsf@nosuchdomain.example.com> <vrdi0g$47cb$3@dont-email.me>
 <vrdifm$4n2o$1@dont-email.me> <vrdj4b$47cb$4@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 19 Mar 2025 06:23:23 +0100 (CET)
Injection-Info: dont-email.me; posting-host="18bb9c70b229fe74b0a5a3e7c7b007b1";
	logging-data="154712"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX18s62429VNhtue5R/EI6I5W5ylCXIImnPqrFRexFT9abg=="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:bZigXKHdgvoih7v0cpnLEwmsTM8=
In-Reply-To: <vrdj4b$47cb$4@dont-email.me>
Content-Language: en-GB

On 19/03/2025 05:02, DFS wrote:
> On 3/19/2025 12:51 AM, Richard Heathfield wrote:
>> On 19/03/2025 04:42, DFS wrote:
>>> Pretty easy fixes:
>>>
>>> 1 use scanf()
>>> 2 update int to long
>>> 3 handle special case of n = 1
>>> 4 instead of collecting the results in a char variable, I print
>>>    them as they're calculated
>>
>> You've also fixed another glitch which may or may not have been 
>> significant:
>>
>> $ file post2.txt
>> post2.txt: news, ASCII text
>>
>> So wherever that UTF-8 came from, it's gone now.
> 
> Cool.  Thanks for looking at it.
> 
> Hey, how are your C book (from 2000) sales?  Thought about a new 
> edition?

I'm not sure a new edition is necessary, but if it is to be 
written it would be better served by someone like Keith or Tim, 
both of whom have (as I have not) kept up with the 
million-and-one changes that appear to have assailed the simple 
language I once enjoyed.

-- 
Richard Heathfield
Email: rjh at cpax dot org dot uk
"Usenet is a strange place" - dmr 29 July 1999
Sig line 4 vacant - apply within