2.12: TQGIO

TOCGroup 1TQUSEDTQCIOGroup 2A-ZGroup 1

GET-VALUE-OF-INPUT-OUTPUT-OPTION

Use TQGIO to get the unit number and language used for error messages, and the unit number for the thermodynamic data-file and optional output lists, respectively.

Synopsis

FORTRAN: CALL TQGIO(OPTION,IVAL,NOERR)

C: tqgio(option,&ival,&noerr);

Pascal: tqgio(option,ival,noerr);

Basic: Call tqgio(option,ival,noerr)


Name Type Value set on call or returned
OPTION CHARACTER Set to a string as shown in Table 6
IVAL INTEGER Returns the current unit number or the index for the language used
NOERR INTEGER Returns an error number

OPTION is character input identifying the input/output option. Legal values for OPTION are given in Table 6. IVAL is output and equal to the current unit number or to the index for the language used for error messages (see Table 6).

See also

TQCIO

Examples

FORTRAN:View plain source code



C Get values for input/output options PROGRAM CAF5 IMPLICIT NONE
INTEGER NOERR, NVALUE
C Initialise ChemApp CALL TQINI(NOERR)
C Get values for input/output options
C Determine which FORTRAN unit is used by TQRFIL for reading the C thermochemical data-file CALL TQGIO('FILE ', NVALUE, NOERR)
50 FORMAT(1X,A,I3)
WRITE(UNIT=*,FMT=50) 'The thermochemical data will be read '// * 'from the file associated with unit ',NVALUE

Output:
 The thermochemical data will be read from the file associated with unit  10

END

C:View plain source code




/* Program cac5 */ /* Get values for input/output options */
#include "cacint.h"
int main() { LI noerr, iovalue;
/* Initialise ChemApp */ tqini(&noerr);
/* Get values for input/output options
Determine which FORTRAN unit is used by tqrfil for reading the thermochemical data-file */

tqgio("FILE", &iovalue, &noerr);
printf("The thermochemical data will be read from the file " "associated with unit %li\n", iovalue);

Output:
The thermochemical data will be read from the file associated with unit 10

return 0;
}

Table 6: Legal input/output options used by TQGIO and TQCIO

Option Meaning Default value
FILE Unit from which the thermodynamic data-file is read 10
ERROR Unit to which error messages are directed 6
LIST Unit to which optional equilibrium output lists are directed 6
LANGUAGE Language used for error messages (1=English, 2=German, 3=French, 4=Swedish, 5=Finnish) 1


ChemApp Programmer's Manual, Edition 3.6© GTT-Technologies, 2003