swirl
Guide to OmniMark 8   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
  Related Syntax    
modifier  

binary-input

 
 

Syntax

binary-input constant numeric-expression


Purpose

Provides a default byte-ordering code used by the binary operator when the monadic form is used. When binary-input is not included, the default byte-ordering code is 0.

binary-input can appear anywhere in OmniMark code, any number of times. If more than one is used, each must specify the same constant numeric value. If there is no binary-input declaration before the first rule or function definition, zero (0) is assumed and any later declarations must also specify 0.

The code value may be specified as a constant-numeric-expression. This is useful when a constant value can be represented for macro-input.

The following code illustrates the use of the binary-input declaration. The test is "true" when the characters saved in the pattern variable "sequence-length" describe a binary value greater than 100. Note that the binary-input declaration indicates that the most significant values come last. If the pattern variable "sequence-length" contains the text "e%0#%0#%0#", the binary evaluation of the value is 101.

  binary-input 3
  ...
  find any => sequence-length
  ...
     when binary sequence-length > 100

    Related Syntax
   binary
 
 
 

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

OmniMark 8.2.0 Documentation Generated: March 13, 2008 at 3:33:48 pm
If you have any comments about this section of the documentation, please use this form.

Copyright © Stilo International plc, 1988-2008.