[UP]


Manual Reference Pages  - system_errno (3)

NAME

system_errno(3f) - [M_system] C error return value (LICENSE:PD)

CONTENTS

Synopsis
Description
Example

SYNOPSIS

integer(kind=c_int) function system_errno()

DESCRIPTION

Many C routines return an error code which can be queried by errno. The M_system(3fm) is primarily composed of Fortran routines that call C routines. In the cases where an error code is returned vi system_errno(3f) these routines will indicate it.

EXAMPLE

Sample program:

   program demo_system_errno
   use M_system, only : system_errno, system_unlink, system_perror
   implicit none
   integer :: stat
   stat=system_unlink(’not there/OR/anywhere’)
   if(stat.ne.0)then
           write(*,*)’err=’,system_errno()
           call system_perror(’*demo_system_errno*’)
   endif
   end program demo_system_errno

Typical Results:

   err=           2
   *demo_system_errno*: No such file or directory


system_errno (3) July 05, 2020
Generated by manServer 1.08 from cb4e8d90-776c-42ce-b663-a130c4c87810 using man macros.