Defining code within a subroutine reminds me of the tombstone in Silicon Valley ; LDA Life GOSUB Death Pookie ----- Original Message ----- From: "Olin Lathrop" To: "Microcontroller discussion list - Public." Sent: Wednesday, February 22, 2006 4:54 AM Subject: Re: [PIC] 2 questions about 18f4550 > Michael Rigby-Jones wrote: >> Correct only from an ANSI point of view maybe. The HiTech compiler >> expects void main( void ) as the declaration of main, which is >> technicaly correct for an embedded program. > > Actually even that contains unnecessary baggage for an embedded system. > There is no good reason for the top level routine to be a subroutine at > all. > The point of not providing a return value is that there is nothing to > return > to. Once again this runs into a problem with C adapted to small embedded > systems. There is no way to define executable code except within a > subroutine. Some languages do have this capability, like Pascal and even > FORTRAN, so the concept is not new. > > > ****************************************************************** > Embed Inc, Littleton Massachusetts, (978) 742-9014. #1 PIC > consultant in 2004 program year. http://www.embedinc.com/products > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist