avr-libc-dev
[Top][All Lists]
Advanced

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

Re: [avr-libc-dev] Working octal code (FYI)


From: David Brown
Subject: Re: [avr-libc-dev] Working octal code (FYI)
Date: Fri, 16 Dec 2016 14:43:29 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0

On 16/12/16 09:56, Dale Whitfield wrote:
> Hi George,
> 
>> (Am I annoying everyone by using this mailing list as my personal
>> coding blog?)
>>
> 
> No. But I speak for myself.
> 
> Some of us are interested and reading but don't have time to comment or
> to work through the code.
> 
> Your efforts are appreciated.
> 

My feelings are much the same.

I would not put in too much effort into making this code fast (except
for the fun of it, of course).  Printing in octal is necessary to make
printf long long support complete.  But it is unlikely to be useful in
practice - people very rarely use octal.  I can think of only 4 use-cases:

1. chmod parameters on *nix.
2. 0 is an octal constant in C, and is often quite handy.
3. "uint8_t month = 09;" is a fine way to get accidental compile-time
errors.
4. "uint16_t year_of_nicaea = 0325;" is a fine way to get accidental
run-time errors.

Still, as long as octal is in the C standards, it is great that you are
doing this work to finish the standard support in printf.





reply via email to

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