Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C > Re: ****tabilit...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 21 of 36 Topic 26061 of 26960
Post > Topic >>

Re: ****tability: Harmony between PC and microcontroller

by "Herbert Rosenau" <os2guy@[EMAIL PROTECTED] > May 6, 2008 at 07:01 PM

On Mon, 5 May 2008 01:16:43 UTC, Tomás Ó hÉilidhe <toe@[EMAIL PROTECTED]
> 
wrote:

> 
> I'll try to summarise this as best I can, as my last thread wasn't
> very to-the-point:

You does simply not understund what C ist.

C comes with a set of different data types usable for fixed point 
arithmetic:

unsigned char      - fits all arithmetic needs for any unsigned value
                     in the range of 0 to UCHAR_MIN
signed char        - fits all arithmetic needs for any signed value
                     in the range of MIN_CHAR to MAX_CHAR

unsigned int       - same as unsigned char, but at least 16 bit wide
signed int         - same as signed char, but at least 16 bit wide

long               - like above but at least 32 bit

long long          - like above but may be wider.

There is no need to invent other data types. A programmer with brain 
for only 1 penny will decide to use the right data type that fits the 
needs for the value it has to fit in. This will be char if the range 
of the value fits in, it will be int, long or long long otherwise. It 
doesn't matter that the ma****ne has only one single register or 4096 
of them to wor with, it does'nt matter if the natural width of a 
register is  8, 9, 16, 18, 24, 32, 36, 48, 64, 128 or 256 whatever 
bit. Either one owns a compiler that works trusty for the job it has 
to do or assembly is the solution.

It is relevant to write standard complilant code whereever it is 
possible, use standard compilant data types, use commononly used code 
constructs because things are changing constantly.

- tomorrow the program has to run under another CPU - the standard has
  foreseen that, so only a new translation cycle has to be done
  and anything works again without unforseen restrictions
- tomorrow you gets fired because you has written constantly
  keywords in an unusual order and the new boss dosn't like that
  because it makes fixing your ****y code more cost intensive.

There is further really no need to invent other order of calles, type 
as the whole C community uses since BCPL, the predecessor of was 
foundet.

Except one will blame himself as ignorant and ties to obfuscate his 
****y code

Be sure you'll gets never hired here based on your misbehavior in 
follllowing common practise, unability to write readable code and 
kidding.
-- 
Tschau/Bye
Herbert

Visit http://www.ecomstation.de
the home of german eComStation
eComStation 1.2R Deutsch ist da!
 




 36 Posts in Topic:
Portability: Harmony between PC and microcontroller
=?ISO-8859-1?Q?Tom=E1s_=D  2008-05-04 18:16:43 
Re: Portability: Harmony between PC and microcontroller
Jack Klein <jackklein@  2008-05-04 21:42:18 
Re: Portability: Harmony between PC and microcontroller
CBFalconer <cbfalconer  2008-05-05 02:45:49 
Re: Portability: Harmony between PC and microcontroller
Martin Ambuhl <mambuhl  2008-05-05 03:38:34 
Re: Portability: Harmony between PC and microcontroller
CBFalconer <cbfalconer  2008-05-05 19:03:03 
Re: Portability: Harmony between PC and microcontroller
"Bartc" <bc@  2008-05-05 10:07:18 
Re: Portability: Harmony between PC and microcontroller
Keith Thompson <kst-u@  2008-05-05 09:28:46 
Re: Portability: Harmony between PC and microcontroller
=?ISO-8859-1?Q?Tom=E1s_=D  2008-05-05 06:57:18 
Re: Portability: Harmony between PC and microcontroller
CBFalconer <cbfalconer  2008-05-05 19:09:27 
Re: Portability: Harmony between PC and microcontroller
Chris Dollin <chris.do  2008-05-06 12:33:20 
Re: Portability: Harmony between PC and microcontroller
=?ISO-8859-1?Q?Tom=E1s_=D  2008-05-06 05:20:29 
Re: Portability: Harmony between PC and microcontroller
Chris Dollin <chris.do  2008-05-06 13:40:21 
Re: Portability: Harmony between PC and microcontroller
Eric Sosman <Eric.Sosm  2008-05-06 10:53:13 
Re: Portability: Harmony between PC and microcontroller
Keith Thompson <kst-u@  2008-05-06 12:28:04 
Re: Portability: Harmony between PC and microcontroller
=?ISO-8859-1?Q?Tom=E1s_=D  2008-05-06 06:06:35 
Re: Portability: Harmony between PC and microcontroller
Chris Dollin <chris.do  2008-05-06 16:16:18 
Re: Portability: Harmony between PC and microcontroller
"soscpd@[EMAIL PROTE  2008-05-06 07:32:43 
Re: Portability: Harmony between PC and microcontroller
=?ISO-8859-1?Q?Tom=E1s_=D  2008-05-06 07:49:48 
Re: Portability: Harmony between PC and microcontroller
"soscpd@[EMAIL PROTE  2008-05-06 09:40:46 
Re: Portability: Harmony between PC and microcontroller
=?ISO-8859-1?Q?Tom=E1s_=D  2008-05-06 10:19:09 
Re: Portability: Harmony between PC and microcontroller
"Herbert Rosenau&quo  2008-05-06 19:01:56 
Re: Portability: Harmony between PC and microcontroller
=?ISO-8859-1?Q?Tom=E1s_=D  2008-05-06 15:29:56 
Re: Portability: Harmony between PC and microcontroller
santosh <santosh.k83@[  2008-05-17 01:14:57 
Re: Portability: Harmony between PC and microcontroller
jacob navia <jacob@[EM  2008-05-16 22:24:28 
Re: Portability: Harmony between PC and microcontroller
Ben Pfaff <blp@[EMAIL   2008-05-16 13:42:16 
Re: Portability: Harmony between PC and microcontroller
jacob navia <jacob@[EM  2008-05-17 01:22:10 
Re: Portability: Harmony between PC and microcontroller
Ian Collins <ian-news@  2008-05-17 09:28:15 
Re: Portability: Harmony between PC and microcontroller
soscpd <soscpd@[EMAIL   2008-05-06 20:47:09 
Re: Portability: Harmony between PC and microcontroller
Bart van Ingen Schenau &l  2008-05-07 06:05:12 
Re: Portability: Harmony between PC and microcontroller
Flash Gordon <spam@[EM  2008-05-07 20:01:34 
Re: Portability: Harmony between PC and microcontroller
"robertwessel2@[EMAI  2008-05-07 11:45:58 
Re: Portability: Harmony between PC and microcontroller
Bart van Ingen Schenau &l  2008-05-08 02:46:03 
Re: Portability: Harmony between PC and microcontroller
Bart van Ingen Schenau &l  2008-05-08 03:14:57 
Re: Portability: Harmony between PC and microcontroller
=?ISO-8859-1?Q?Tom=E1s_=D  2008-05-16 16:12:50 
Re: Portability: Harmony between PC and microcontroller
Chris H <chris@[EMAIL   2008-05-17 09:00:09 
Re: Portability: Harmony between PC and microcontroller
Ian Collins <ian-news@  2008-05-17 20:18:27 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu Jul 24 16:40:13 CDT 2008.