Re: 32 or 64 bit processor info in C
- From: "Malcolm McLean" <regniztar@xxxxxxxxxxxxxx>
- Date: Sat, 21 Apr 2007 08:32:37 +0100
"Ian Collins" <ian-news@xxxxxxxxxxx> wrote in message news:58tgpjF2i6eqtU29@xxxxxxxxxxxxxxxxxxxxx
Richard Heathfield wrote:People should be taught that it is almost never necessary to write code like this.Ian Collins said:If don't specify the type, everyone else who wants it has to add their
When ever C hits the real world, developers have added fixed size
types.
Now they are standardised. Good.
Whenever language designers specify fixed size types, they have to come
back later and specify some more. Bad.
own, so we ended up with typedefs like U8, INT16 and just about every
other possible naming of fixed types. At least the standard now sets a
naming convention.
Data is almost always either real numbers, strings, booleans, enumerated symbols, or indices into arrays (technically a subset of keys). So double or float, char *, and int should be basically all you need.
Almost always isn't alway always, and just occasionally you need an integer of a different type. But it is very occasionally.
A cynic like me might argue that once you admit the size_t and ptrdif_t gibberish into you code it is unreadable anyway and more gibberish won't make any difference.
--
Free games and programming goodies.
http://www.personal.leeds.ac.uk/~bgy1mm
.
- Follow-Ups:
- Re: 32 or 64 bit processor info in C
- From: Walter Roberson
- Re: 32 or 64 bit processor info in C
- From: Ian Collins
- Re: 32 or 64 bit processor info in C
- References:
- 32 or 64 bit processor info in C
- From: broeisi
- Re: 32 or 64 bit processor info in C
- From: Malcolm McLean
- Re: 32 or 64 bit processor info in C
- From: Eric Sosman
- Re: 32 or 64 bit processor info in C
- From: Stephen Sprunk
- Re: 32 or 64 bit processor info in C
- From: Keith Thompson
- Re: 32 or 64 bit processor info in C
- From: Malcolm McLean
- Re: 32 or 64 bit processor info in C
- From: Eric Sosman
- Re: 32 or 64 bit processor info in C
- From: Malcolm McLean
- Re: 32 or 64 bit processor info in C
- From: Keith Thompson
- Re: 32 or 64 bit processor info in C
- From: Malcolm McLean
- Re: 32 or 64 bit processor info in C
- From: Richard Bos
- Re: 32 or 64 bit processor info in C
- From: Malcolm McLean
- Re: 32 or 64 bit processor info in C
- From: Keith Thompson
- Re: 32 or 64 bit processor info in C
- From: Malcolm McLean
- Re: 32 or 64 bit processor info in C
- From: Eric Sosman
- Re: 32 or 64 bit processor info in C
- From: Malcolm McLean
- Re: 32 or 64 bit processor info in C
- From: Eric Sosman
- Re: 32 or 64 bit processor info in C
- From: Richard Heathfield
- Re: 32 or 64 bit processor info in C
- From: Eric Sosman
- Re: 32 or 64 bit processor info in C
- From: Malcolm McLean
- Re: 32 or 64 bit processor info in C
- From: Richard Bos
- Re: 32 or 64 bit processor info in C
- From: Malcolm McLean
- Re: 32 or 64 bit processor info in C
- From: Ian Collins
- Re: 32 or 64 bit processor info in C
- From: Richard Heathfield
- Re: 32 or 64 bit processor info in C
- From: Ian Collins
- 32 or 64 bit processor info in C
- Prev by Date: Re: gcc 64bit compiler does not offer any speed advantage
- Next by Date: Re: 32 or 64 bit processor info in C
- Previous by thread: Re: 32 or 64 bit processor info in C
- Next by thread: Re: 32 or 64 bit processor info in C
- Index(es):
Relevant Pages
|