swirl
Guide to OmniMark 7   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
  Related Syntax   Related Concepts  
control structure  

repeat scan

 
 

Syntax

  repeat scan string-expression
     (match pattern condition?
        local-declaration*
        action*)+
  again


Purpose

Scans a string-expression for specified patterns in the same manner as the do scan action. When a match is found, the corresponding actions are performed. However, the string is then scanned again, from the first character to the right of the part matched by the previous iteration.

This process continues until one of the following conditions has been met:

Note that an else phrase may not be used in a repeat scan action. If an "if all else fails" (if no other case applies) case is required, a match any alternative can be used with exit at the end to terminate the loop.

In repeat scan, patterns that can match zero characters are given special treatment. Zero characters cannot be matched successfully twice in a row. OmniMark enforces this by interpreting a match of zero characters as successful only if the previous iteration matched one or more characters.

    Related Syntax
   halt, halt-everything
   return
   do scan
 
Related Concepts
   Pattern matching
   Pattern matching functions
 
 

Top [ INDEX ] [ CONCEPTS ] [ TASKS ] [ SYNTAX ] [ LIBRARIES ] [ LEGACYLIBRARIES ] [ ERRORS ]

OmniMark 7.1.2 Documentation Generated: June 28, 2005 at 5:45:43 pm
If you have any comments about this section of the documentation, send email to [email protected]

Copyright © Stilo Corporation, 1988-2005.