SG2ERR or TQG2ERR
This is a logical function.
Fortran |
ERROR=SG2ERR(IERR) or ERROR=TQG2ERR(IERR) |
|
---|---|---|
C-interface |
error=tq_sg2err(TC_INT* ierr); |
|
Full name: |
Get Error Code. |
|
Purpose: |
This is a logical function which should be called after calling any TQ subroutine that can detect an error. If there is an error the function value is .TRUE and the appropriate error code is in IERR. This subroutine does not print the error message. |
|
Comments: |
Use for the normal error checking. Note that it is possible that the error message has already been printed by ST1ERR. The program may be able to handle the error to pass it on upwards. If no error the function value is .FALSE and IERR is zero. If the C-interface is used the value returned is of type: TC_BOOL. ![]() LOGICAL SG2ERR ... CALL TQCE(' ',IWSG,IWSE) IF(SG2ERR(IERR)) GOTO 900 ... 900 RETURN |
|
Arguments |
||
Name |
Type |
Value set on call or returned |
IERR |
Integer |
Set to the error code |

Note the following conventions to distinguish between the programming languages.
- Routines starting with TQXXX, for example, TQGDAT, are in the Fortran interface
- Routines starting with tq_xxxx, for example tq_gdat, are in the C-interface.
- In Fortran, all routines are subroutines and do not return any values except where explicitly declared as functions.
- All the C procedures are declared as void and do not return any values except where explicitly otherwise declared.
An example of how to read the subroutine definitions.