I too find it awkward, but in fact, the length of an int is always platform dependent, we have just gotten (God, I hate that word) used to 16 bit ints on Intel platforms. Normally an int is the same length as the predominant register length, which on a PIC, is clearly 8 bits. A 16 bit int is not part of the C standard. CIAO - Martin R. Green elimar@bigfoot.com ---------- From: John Payson[SMTP:supercat@MCS.NET] Sent: Monday, September 29, 1997 1:45 PM To: PICLIST@mitvma.mit.edu Subject: Re: Is there a problem with the BYTE CRAFT C? > I was observing the machine code created for the "int" type of C > and see that only compare one position of memory, and for a "long int", > only compare two positions of memory! Was this problem resolved? > > My compiler is a 1995 version! I personally find it offensive that most C compilers for the PIC (the only exception I know of is HiTech's) regard "int" as an 8-bit type and "long" as a 16-bit type. Both of these definitions are clearly contrary to the C stan- dard (nb: a compiler I use on a different chip has both "char" and "int" as 16-bit types, and sizeof(char)==1, but _that_ is _allowable_ by the C stan- dard). Nonetheless, if you use definitions like: typedef unsigned char ub; /* "Unsigned Byte" */ typedef unsigned long ui; /* "Unsigned Int" */ then these annoyances shouldn't pose too much of a headache.