2.4: TQLITE

TOCGroup 1TQVERSTQGTIDGroup 2A-ZGroup 1

CHECK-IF-CHEMAPP-LIGHT

Use TQLITE to check whether the type of ChemApp currently used is ChemApp light.

Added for ChemApp version 2.0.1

Synopsis

FORTRAN: CALL TQLITE(ISLITE,NOERR)

C: tqlite(&islite,&noerr);

Pascal: tqlite(islite,noerr);

Basic: Call tqlite(islite,noerr)


Name Type Value set on call or returned
ISLITE INTEGER Returns 1 for ChemApp light, 0 for ChemApp
NOERR INTEGER Returns an error number

TQLITE can be used to distinguish between the regular version of the ChemApp library, and ChemApp light. ChemApp and ChemApp light differ in a couple of ways (see Chapter 1.3).

If TQLITE returns a 0 through ISLITE, the regular version of ChemApp is linked to the calling program. If a 1 is returned, ChemApp light is used.

The code examples of the manual make use of this subroutine primarily to determine whether target calculations can be performed.

Examples

FORTRAN:View plain source code



C Testing for the presence of ChemApp "light"
PROGRAM CAF23 IMPLICIT NONE
INTEGER NOERR, ISLITE
C Initialise ChemApp CALL TQINI(NOERR)
20 FORMAT(1X,A)
C Find out whether we are working with the regular or the "light" C version CALL TQLITE(ISLITE, NOERR) WRITE(*,FMT=20) * 'This application program has been linked against' IF (ISLITE .EQ. 1) THEN WRITE(*,FMT=20) * 'ChemApp "light".' ELSE WRITE(*,FMT=20) * 'the regular version of ChemApp.' ENDIF

Output:
 This application program has been linked against
 the regular version of ChemApp.

END

C:View plain source code



/* Program cac23 */ /* Testing for the presence of ChemApp "light" */
#include "cacint.h"
int main() { LI noerr, islite;
/* Initialise ChemApp */ tqini(&noerr);
/* Find out whether we are working with the regular or the "light" version */ tqlite(&islite, &noerr); printf("This application program has been linked against\n"); if (islite) printf("ChemApp \"light\".\n"); else printf("the regular version of ChemApp.\n");

Output:
This application program has been linked against
the regular version of ChemApp.

return 0; }


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