C Library Functions  - fstop (3)

NAME

fstop(3f) - [M_framework__utility] call stop with both a number and a message (LICENSE:PD)

CONTENTS

Synopsis
Description
Options
Examples
See Also
Author
License

SYNOPSIS

subroutine fstop(ierr,stdout,stderr)

    integer,intent(in)                   :: ierr
    character(len=*),intent(in),optional :: stdout
    character(len=*),intent(in),optional :: stderr

DESCRIPTION

FSTOP(3f) call STOP(3f). What a call to STOP does is very system dependent, so using an abstraction layer is useful, as it allows just the fstop() routine to be changed; and STOP does not allow a variable to be used on the numeric access status (this has changed at f2015).

OPTIONS

ierr - value in range 0 to 32
stdout - description to be printed to standard output
stderr - description to be printed to standard error

EXAMPLES

Sample program:

   program demo_fstop
   use M_framework__utility, only: fstop
   implicit none
   integer :: int
   !*!write(*,*)’Enter stop value’
   !*!read(*,*) int
   int=25
   select case(int)
   case(10) ; call fstop(int)
   case(20) ; call fstop(int,stderr=’error: program will now stop’)
   case(25) ; call fstop(int,stdout=’stdout message’, &
                   & stderr=’stderr message’)
   case(30) ; call fstop(int,stdout=’error: program will now stop’)
   case default
              call fstop(int)
   endselect

end program demo_fstop

Results:

SEE ALSO

Look for common extensions, such as abort(3f), backtrace(3f)

AUTHOR

John S. Urban

LICENSE

Public Domain


Nemo Release 3.1 fstop (3) July 22, 2023
Generated by manServer 1.08 from c0b24ad7-2a4e-40b6-bbc1-ec2855454a80 using man macros.