VMS Help  —  PASCAL  Predeclared Routines, Misc  FIND_FIRST_BIT_SET
  The FIND_FIRST_BIT_SET function  locates  the  first  bit  in  a
  Boolean array whose value is 1 and returns an integer value that
  specifies the index into the array.

  Syntax:

     FIND_FIRST_BIT_SET( vector [[, start_index]] )

  The 'vector' parameter is a variable of  type  PACKED  ARRAY  OF
  BOOLEAN  with an INTEGER index type.  The optional 'start-index'
  parameter must be an expression of an integer type that  indexes
  the  element  at  the  point  at  which  the search starts.  The
  'starting index' must be greater than or equal to  the  vector's
  lower bound, and less than or equal to 1 plus the vector's upper
  bound; otherwise, a range violation  occurs.   If  omitted,  the
  starting index defaults to the vector's first element.

  The  FIND_FIRST_BIT_SET  function  returns  an   integer   value
  indexing the first element containing the value 1.  If no bit is
  1, the result is 1 plus the vector's upper bound.  If the vector
  or the indexed part of the vector has a size of 0, the result is
  start-index.
Close Help