[UP]


Manual Reference Pages  - fstop (3)

NAME

fstop(3f) - [M_verify] 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_verify, 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


fstop (3) March 11, 2021
Generated by manServer 1.08 from 1e111bb2-ca6b-4cf7-b0ab-1cbb37753d3e using man macros.