Breaking out of dolist...

Started by Sunburned Surveyor, November 30, 2005, 04:10:43 PM

Previous topic - Next topic

Sunburned Surveyor

Is it possible to break out of a dolist loop before all of the elements in the subject list have been iterated through?



For example, I want to use dolist to manipulate each element in a list until I reach an element with a certain value. Is this possible?



What syntax would I use to break out of a dolist or other loop in NewLISP?



I checked the NewLISP manual, but I couldn't find a "break" statement that is common to other languages.



The Sunburned Surveyor

Sammo

#1
See the (dotimes ...) example in the Throw section of the help file.

-- Sam