int read_length (hfile file, int64 position, p_minmax bounds)
{
  int read (hfile file, int64 position, p_minmax bounds)
  {
    void check (int x, p_minmax bounds)
    {
      return (bounds->min < x && x < bounds->max) ? : << ERR_BOUNDS;  
    }

    int x = 0; check (x, bounds), { stdio:read (&x, -_, file, position) }; return x;
  }

  do ()  
  {
    return x, { x = read (file, position, bounds) };
  }
  else
  {
    return 0;
  }
}