pxfconst

Date:

10-20-2011

NAME

PXFCONST, PXFISCONST, IPXFCONST - Returns the value associated with symbolic constants

SYNOPSIS

CHARACTER*(n) constname
INTEGER ival, ierror
LOGICAL PXFISCONST, 1
i = IPXFCONST (constname)
l = PXFISCONST (constname)
CALL PXFCONST (constnam, ival, ierror)

IMPLEMENTATION

Cray Linux Environment (CLE)

DESCRIPTION

These functions provide a way for the Fortran programmer to get the value of some symbolic constants defined in system header files.

IPXFCONST() provides an integer return value but no error checking. If the argument passed corresponds to one of the defined constants shown below, the return value is the integer value associated with the constant; if the argument is not a defined constant, the return value is meaningless. PXFISCONST() confirms whether the argument is a valid constant. PXFISCONST() returns TRUE only if IPXFCONST() would return a valid value for the same constname.

Upon successful completion, the subroutine PXFCONST() returns in ival the integer value associated with the constant described by constname.

When using the Cray Fortran compiler, all arguments must be of default kind unless documented otherwise. The default kind is KIND=4 for integer, real, complex, and logical arguments.

The following is a list of arguments for these subroutines:

constname

An input character variable that represents the name of a constant. constname is case-sensitive, and trailing blanks in the argument are ignored.

  • The following are valid values for constname. The second column contains the system header file where the symbolic constant is defined, or the standard where it is defined.

    ‘F_GETLK’

    <fcntl.h>

    ‘F_SETLK’

    <fcntl.h>

    ‘F_SETLKW’

    <fcntl.h>

    ‘F_RDLCK’

    <fcntl.h>

    ‘F_WRLCK’

    <fcntl.h>

    ‘F_UNLCK’

    <fcntl.h>

    ‘F_DUPFD’

    <fcntl.h>

    ‘F_GETFD’

    <fcntl.h>

    ‘F_SETFD’

    <fcntl.h>

    ‘F_GETFL’

    <fcntl.h>

    ‘F_SETFL’

    <fcntl.h>

    ‘O_RDONLY’

    <fcntl.h>

    ‘O_WRONLY’

    <fcntl.h>

    ‘O_RDWR’

    <fcntl.h>

    ‘O_ACCMODE’

    <fcntl.h>

    ‘O_NDELAY’

    <fcntl.h>

    ‘O_APPEND’

    <fcntl.h>

    ‘O_SYNC’

    <fcntl.h>

    ‘O_NONBLOCK’

    <fcntl.h>

    ‘O_RAW’*

    <ttold.h>

    ‘O_CREAT’

    <fcntl.h>

    ‘O_TRUNC’

    <fcntl.h>

    ‘O_EXCL’

    <fcntl.h>

    ‘O_NOCTTY’

    <fcntl.h>

    ‘SEEK_SET’

    <stdio.h>

    ‘SEEK_CUR’

    <stdio.h>

    ‘SEEK_END’

    <stdio.h>

    ‘STDIN_FILENO’

    POSIX.9

    ‘STDOUT_FILENO’

    Posix.9

    ‘STDERR_FILENO’

    Posix.9

Posix.9 specific errors: ‘ENONAME’

liberrno.h

‘ENOHANDLE’

liberrno.h

Errnos 1-98 from <errno.h>, for example: ‘EPERM’

Cray implementation errors:

EBADID

If the idirid argument is an invalid directory ID

EBADHANDLE

If the handle is invalid

Additional values for constname are described in descriptions of other PXF routines such as PXFACCESS, PXFCHMOD, PXFCREAT, PXFOPEN, and so on.

ival

An output integer variable. The value associated with the constant.

ierror

An output integer variable. It contains the exit status.

EXIT STATUS

Upon successful completion, the argument ierror is set to 0. If any of the following conditions occur, PXFCONST() sets ierror to the corresponding value.

ENONAME

Invalid constant name

ENOMEM

PXFCONST() could not allocate the memory required

SEE ALSO

PXFACCESS(3F), PXFCHMOD(3F), PXFCREAT(3F)