public handler ListUpToSentinel(in pList as list, in pSentinel asstring) as listvariable tElementvariable tNewList as listputtheempty list into tNewListrepeatforeachelement tElement in pListif tElement isastringand tElement is pSentinel thenexitrepeatendifpush tElement onto tNewListendrepeatreturn tNewListend handler
Description
Use exit repeat to exit a repeat loop, for example when a certain condition is met.