src/IntRank2/IntHF.cc
/* These functions write parameters defining a hyperfine interaction into a
   specified ASCII file.

           Input                HF      : Hyperfine interaction
                                fn      : Output file name
                                ofstr   : Output file stream
                                idx     : Interaction index (default -1)
                                pfx     : Interaction 2nd indx (def -1)
                                wrn     : Warning level
           Output               none    : Dipolar interaction parameters
                                          written in parameter set format to
                                          file filename or ostream ofstr     */
These functions write parameters defining a hyperfine interaction into a
specified ASCII file.


These functions write parameters defining a hyperfine interaction into a specified ASCII file .
int IntHF::write(const string &filename, int idx, int pfx, int warn) const
  {
  ofstream ofstr(filename.c_str());     
  int w2 = 0;                           
  if(warn) w2 = 1;
  if(!write(ofstr, idx, pfx, w2))       
    {
    IHFerror(1, filename, 1);		
    if(warn>1) IHFfatal(20);		
    return 0;
    }
  ofstr.close();                        
  return 1;
  }
int IntHF :: write ( const string & filename , int idx , int pfx , int warn ) const { ofstream ofstr ( filename . c_str ( ) ) ; int w2 = 0 ; if ( warn ) w2 = 1 ; if ( ! write ( ofstr , idx , pfx , w2 ) ) { IHFerror ( 1 , filename , 1 ) ; if ( warn > 1 ) IHFfatal ( 20 ) ; return 0 ; } ofstr . close ( ) ; return 1 ; }
These functions write parameters defining a hyperfine interaction into a
specified ASCII file.
These functions write parameters defining a hyperfine interaction into a specified ASCII file .
// Open filename for input // Added warning level // If file bad then exit // Filename problems // Fatal error // Close it now