function value = bread( fid, bits, num );
%
%
%
%
%
if( bits < 0 )
 prec=sprintf('bit%d', -bits);
else
 prec=sprintf('ubit%d', bits);
end

if( bits ~= 0 ), 
  if ( exist('num','var') )
    value = fread( fid, num, prec );
  else
    value = fread( fid, prec );
  end
end   

