That's kinda what I thought. I finally found some references to the problem in computer-science texts, namely, "Write a do-loop that prints the following:" 1,2,3,4,5,6,7,8,9,10 but not 1,2,3,4,5,6,7,8,9,10, It is easy to write a loop that will print the second sequence, but slightly trickier to print the first esp. for a beginner. And oh how many times have I run into this problem? I can think of a dozen, Just didn't have a name for it before. -- Lawrence Lile Andrew Warren Sent by: pic microcontroller discussion list 02/07/2003 08:46 PM Please respond to pic microcontroller discussion list To: PICLIST@MITVMA.MIT.EDU cc: Subject: Re: changed to [EE]: llile@saltonusa.com wrote: > what exactly is the "fence-post problem"? It's nothing at all tricky, Lawrence, although some people seem unable to acquire an intuitive sense for it. It's just this: You have a fence 100 meters long, with a post every meter. How many posts do you have? The answer to the above is sometimes contrasted with the answer to this: You have a fence enclosing an area whose perimeter is 100 meters, and there's a post every meter. How many posts do you have? -Andy === Andrew Warren -- aiw@cypress.com === Principal Design Engineer === Cypress Semiconductor Corporation === === Opinions expressed above do not === necessarily represent those of === Cypress Semiconductor Corporation -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu