f90_stat: STAT Error Code Module

Table of Contents

1 Name

f90_stat — Module providing STAT error codes

2 Usage

USE F90_STAT

3 Synopsis

Parameters
STAT_ALREADY_ALLOCATED, STAT_MEMORY_LIMIT_EXCEEDED, STAT_NO_MEMORY, STAT_NOT_ALLOCATED, STAT_NOT_ASSOCIATED, STAT_PART_OF_LARGER_OBJECT, STAT_POINTER_UNDEFINED, STAT_WRONG_COLOUR.

4 Parameter Description

  INTEGER,PARAMETER :: STAT_ALREADY_ALLOCATED
An allocatable variable in an ALLOCATE statement is already currently allocated.

  INTEGER,PARAMETER :: STAT_MEMORY_LIMIT_EXCEEDED
An allocation in an ALLOCATE statement requested more memory than the limit in this version of the NAG Fortran compiler.

  INTEGER,PARAMETER :: STAT_NO_MEMORY
Insufficient free memory available to satisfy the requested allocation.

  INTEGER,PARAMETER :: STAT_NOT_ALLOCATED
An allocatable variable in a DEALLOCATE statement is not currently allocated.

  INTEGER,PARAMETER :: STAT_NOT_ASSOCIATED
A pointer in a DEALLOCATE statement is disassociated.

  INTEGER,PARAMETER :: STAT_PART_OF_A_LARGER_OBJECT
A pointer in a DEALLOCATE statement refers to part of a larger object.

  INTEGER,PARAMETER :: STAT_POINTER_UNDEFINED
A pointer in a DEALLOCATE statement is undefined. (This value is never returned to the user program, which is always immediately terminated if the use of an undefined pointer is detected.)

  INTEGER,PARAMETER :: STAT_WRONG_COLOUR
A pointer in a DEALLOCATE statement is associated with a target that was not created by pointer allocation.

5 Example

USE f90_stat
REAL,ALLOCATABLE :: big(:,:,:)
INTEGER :: status
ALLOCATE(big(100,1024,1024),STAT=status)
IF (status==STAT_NO_MEMORY) PRINT *,'Out of memory'

6 Notes

The source code for this module may be found in the NAG Fortran runtime library directory (usually /usr/local/lib/NAG_Fortran).

7 See Also

nagfor(1), nag_modules(3).

8 Bugs

Please report any bugs found to ‘support@nag.co.uk’ or ‘support@nag.com’, along with any suggestions for improvements.