I do this all the time. Usually on an error condition I do a goto the initialization routine, so everything is placed in a known set of conditions. I have never had any problems doing this. Fr. Tom Mcgahee ---------- > From: Steve Ridley > To: PICLIST@MITVMA.MIT.EDU > Subject: Using a goto to terminate a function. > Date: Sunday, March 28, 1999 8:38 PM > > PIClisters > > I have a question regarding the use of a goto rather than a return to > terminate a function call. In certain circumstances I could save a lot of > code if I could terminate functions by just going to a general clean up area > and then back to my main loop without ever returning to the place the > function was called from. This means I am leaving the return address on the > stack. What if any are the implications of doing this ? Is there some other > way to achieve this ? Will the stack overflow or will it not matter because > the unused return addresses eventually get pushed off the end of the stack? > Does the PIC do anything when a stack overflow condition occurs ? > > Steve Ridley > Blue Ocean Telecommunications > Sydney, Australia