Thanks to all those that provided some great assistance. I got very strange results when changing the lower part of the conditional statement so i figured that the conditional statement must be trashed in memory somehow and must be due to something I was doing wrong. With the help of >>> well, the current value of MAX-TCP-SOCKET: MAX_TCP_SOCKETS I could prove that the define worked as expected just the conditional statement lost the plot. I discovered that there was a circular reference ie a .h file referred to a .h file that included the first .h file. Thanks again. Cheers Justin . -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist