Lies in education [was Re: The "loop and a half"]

Rhodri James rhodri at kynesim.co.uk
Thu Oct 12 11:55:04 EDT 2017


On 12/10/17 16:06, Grant Edwards wrote:
> On 2017-10-12, Steve D'Aprano <steve+python at pearwood.info> wrote:
>> On Thu, 12 Oct 2017 04:41 pm, Grant Edwards wrote:
>>
>>
>>>> Even two
>>>> different C compilers could return different values.
>>>
>>> Nope.  If sizeof char is not 1, then it's not C.
>>
>> Today I Learned.
> 
> It sure was an education the first I wrote C code for
> a machine where
> 
>   1 == sizeof char == sizeof int == sizeof long == sizeof float == sizeof double
> 
> All were 32 bits.

Ah yes.  In my case it was 16 bits, so sizeof long == 2 just for a 
little variation.

> Writing protocol code that dealt with the outside world via a serial
> port was _painful_.

Amen, brother.

-- 
Rhodri James *-* Kynesim Ltd



More information about the Python-list mailing list