=20 That=92s a great idea. Do you perhaps have some sample code to = demonstrate this? It will be much appreciated :-) Say for example I want a 24 bit signed variable, using a struct for = storage, how would I: Decrement that value Compare it in an 'if' statement? I can see how I would do it using a pointer to the struct, but wouldn't = the storage for the pointer negate the space saved by using a 3 byte struct? Sorry if this is a stupid question, I know C (or I think I do), but are relatively new to PIC's and the need to save as much RAM as possible. = Using C on a PC with 512MB of RAM this is less of an issue ;-). _____ =20 Andr=E9 Miller =09 -----Original Message----- From: pic microcontroller discussion list = [mailto:PICLIST@MITVMA.MIT.EDU] On Behalf Of Gerhard Fiedler Sent: 01 April 2004 01:33 PM To: PICLIST@MITVMA.MIT.EDU Subject: Re: [PIC:] Microchip C18, or HI-TECH PICC18? >>Have you ever found you needed a 24 bit integer datatype and wished=20 >>PICC had support for it? > > Frequently. There are many cases where 16 bits isn't quite enough but = 32 is wasteful. > Probably less of an issue on the PIC18, but on the 16 series, RAM is=20 > usually the first thing you run out of. For me that's "sometimes". In those cases I use 3 byte structs for = storage and the built-in 32 bit routines for the calculations. I've never had a = case where the additional resources that were needed to do the 32 bit calculations (temp register, instruction cycles) were a problem. -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads