David, Syntactically the IF/ELSE/ENDIFs are nested, so you need 1 ENDIF for each IF. If you have 3 IFs you need 3 ENDIFs. If you have 20 IFs you need 20 ENDIFs. (yech!) Here is a good idiot proofing technique: IF Case1+Case2+Case3 != 1 ERROR "You must enable exactly one case!" ENDIF Bob Ammerman RAm Systems (contract development of high performance, high function, low-level software) ----- Original Message ----- From: David VanHorn To: Sent: Sunday, January 14, 2001 2:53 PM Subject: Re: [PIC]: MPASM conditional assembly > > > >If you already know your cases are mutually exclusive then just: > > In the particular case I cited, it's an "idiot trap" in case you > accidentally set two that are supposed to be exclusive to true. > > > > endif > > endif <- notice double endif > > Ah! Ok, someone else sent me some examples, but I thought the double endif > was a typo. > > Is this needed on any if-else if, or only in 3 or more? > -- > Where's dave? http://www.findu.com/cgi-bin/find.cgi?kc6ete-9 > > -- > http://www.piclist.com hint: The PICList is archived three different > ways. See http://www.piclist.com/#archives for details. > > -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.