2.15: TQRBIN | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
TOC | Group 1 | TQRFIL | TQRCST | Group 2 | A-Z | Group 1 |
Reads a thermodynamic data-file in binary format.
Added for ChemApp version 2.1.4
FORTRAN: CALL TQRBIN(NOERR)
C: tqrbin(&noerr)
;
Pascal: tqrbin(noerr)
;
Basic: Call tqrbin(noerr)
Name | Type | Value set on call or returned |
NOERR | INTEGER | Returns an error number |
TQRBIN must be used to read a thermodynamic data-file in binary format. Binary data-files are usually either supplied by GTT-Technologies directly, or created using other software programs (e.g. FACT-Win).
The thermodynamic data-file to be read must be opened in the application program using default unit 10 (see Table 6), unless this has been changed using TQCIO.
For non-FORTRAN programs, TQOPNB and TQCLOS have to be used for opening and closing the data-file.
If the data-file to load is in ASCII (i.e. plain text) format, use TQRFIL instead; if it is in transparent format, use TQRCST.
FORTRAN: | View plain source code |
C Read a thermochemical data-file in BINARY format
C NOTE: This example program requires a data-file in binary format C to run, which is not part of a regular distribution of ChemApp C or ChemApp "light".
PROGRAM CAF29 IMPLICIT NONE
INTEGER NOERR
C Initialise ChemApp CALL TQINI(NOERR)
C Open binary data-file for reading. CALL TQOPNB('cosi.bin', 10, NOERR)
C Read data-file CALL TQRBIN(NOERR)
C Close data-file CALL TQCLOS(10, NOERR)
END
C: | View plain source code |
/* Program cac29 */ /* Read a thermochemical data-file in BINARY format*/
/* NOTE: This example program requires a data-file in binary format to run, which is not part of a regular distribution of ChemApp or ChemApp "light". */
#include "cacint.h"
int main() { LI noerr;
/* Initialise ChemApp */ tqini(&noerr);
/* Note that tqopnb is used to open the thermochemical data-file, instead of a standard C library routine like fopen. The reason is that it is necessary to associate the data-file with a particular FORTRAN unit number (10 by default, see tqgio) so that the FORTRAN subroutine tqrbin can read from the correct file */ tqopnb("cosi.bin",10,&noerr);
/* Read data-file */ tqrbin(&noerr);
/* Close data-file */ /* Again, the routine for closing the data-file is not a standard C library routine like fclose, but a special one to make sure the file that was previously opened under the unit number specified is closed. */ tqclos(10,&noerr);
return 0;
}
ChemApp Programmer's Manual, Edition 3.6 | © GTT-Technologies, 2003 |