swirl Guide to OmniMark 5   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesOMX VariablesErrors
 
  Related Syntax    
pattern   value-end, =|    

Syntax

  value-end


Purpose

value-end is a positional pattern recognized at the end of a scanned value.

Two forms of the value-end pattern are available - the long form and the short form, =|. You should use whatever form leads to the most readable code. For instance, in the following do scan (where every match alternative is guarded by a value-end to ensure that only whole values are matched) it is clearly preferable to use the short form:

  do scan cgi-data{"PATH_INFO"}
      drop ~cgi-data{"SCRIPT_NAME"}
        match "/login" =|
           login-page
        match "/guess" =|
           guess-page
        else
           new-page
     done

But in the following match statement (that matches any characters up to the next comma or the end of the text), the long form is clearly preferable:

  match any** ("," | value-end)

The short form next to the "or" operator (|)would make a pattern that was hard to read:

  match any** ("," | =|)

    Related Syntax
   do scan
   repeat scan
 
 
----

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

Generated: August 11, 2000 at 3:08:11 pm
If you have any comments about this section of the documentation, send email to docerrors@omnimark.com

Copyright © OmniMark Technologies Corporation, 1988-2000.