fstop(3f) - [M_framework__utility] call stop with both a number and a message (LICENSE:PD)
Synopsis
Description
Options
Examples
See Also
Author
License
subroutine fstop(ierr,stdout,stderr)
integer,intent(in) :: ierr character(len=*),intent(in),optional :: stdout character(len=*),intent(in),optional :: stderr
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).
ierr - value in range 0 to 32 stdout - description to be printed to standard output stderr - description to be printed to standard error
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) endselectResults:end program demo_fstop
Look for common extensions, such as abort(3f), backtrace(3f)
John S. Urban
Public Domain
Nemo Release 3.1 | fstop (3) | February 23, 2025 |