[UP]


Manual Reference Pages  - fstop (3)

NAME

fstop(3f) - [M_debug] 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_debug, only: fstop
   implicit none
   integer :: int
   write(*,*)’Enter stop value’
   read(*,*) int
   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) October 17, 2020
Generated by manServer 1.08 from 4795c174-c344-41e9-8f16-b57919d3ccf7 using man macros.