Command: get_bytes (Euphoria get.e,PEU file.c)
  
Syntax: 
  x = get_bytes(fn,number)
  
Description: 
  Get a sequence of characters (bytes) with a length of number
  from file or device fn. The characters will have values from 0 
  to 255. The atom -1 is returned on end of file. 
  
Comments: 
  Because either a sequence or an atom (-1) might be returned, you 
  should probably assign the result to a variable declared as 
  object.
  
Example 1:

      sequence buffer
      object line
              integer fn
      
      -- read a text file into a sequence
      fn = open("myfile.txt", "r")
      if fn = -1 then
        puts(1, "Couldn't open myfile.txt\n")
          abort(1)
      end if
      
      buffer = {}
      while 1 do
       line = get_bytes(fn,100)
       if atom(line) then
      exit   -- -1 is returned at end of file
       end if
       buffer = append(buffer, line)
      end while

 
See Also: 
  getc, gets, open, close
  

