swirl Guide to OmniMark 5   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesOMX VariablesErrors
 
  Related Syntax    
action   not-reached    

Syntax

  not-reached (message string-expression)?


Purpose

You can use the not-reached statement to verify that a position in your code that you do not expect to be reached is in fact not reached. OmniMark throws to #program-error (error code 6133) if a not-reached statement is executed. You can add a message to the throw by specifying a message parameter.

For example,not-reached can be useful in branching constructs where all the values used to select a particular action fall within a certain range:

  do scan command
     match "go" =|
         ;go
     match "pause" =|
        ;pause
     match "stop" =|
        ;pause
     else
        not-reached message 'Unknown command "' || command || '"'
  done

Note that not-reached is functionally equivalent to the expression assert false. You should choose whichever form is most expressive in the context you use it in.

    Related Syntax
   assert
 
 
----

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

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

Copyright © OmniMark Technologies Corporation, 1988-2000.