swirl
Guide to OmniMark 8   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
    Related Concepts  
operator  

shift

 
 

Syntax

numeric-expression shift numeric-expression


Purpose

The result of a shift operator is: the bit sequence specified by the first operand shifted up by the number of places indicated by the second operand.

As bits are shifted, the positions which are no longer occupied are filled with zeros. Thus, shifting a bit sequence by 32 or more in either direction will result in a sequence of all zeros. Bits which go "off the end" are discarded. The result is always a sequence of 32 bits.

This line causes the bit that is second from the bottom to be set to 1, while the rest are set to 0:

  set c to 1 shift 1

      Related Concepts
   Bit-oriented arithmetic
 
 

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.