Skip to content

Commit f4a37da

Browse files
committed
minor commenting updates.
1 parent a507000 commit f4a37da

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

src/json_module.F90

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1018,8 +1018,15 @@ end subroutine json_file_move_pointer
10181018
!# Example
10191019
!
10201020
!```fortran
1021-
! type(json_file) :: f
1022-
! call f%load_file('my_file.json')
1021+
! program main
1022+
! use json_module
1023+
! implicit none
1024+
! type(json_file) :: f
1025+
! call json_initialize()
1026+
! call f%load_file('my_file.json')
1027+
! !...
1028+
! call f%destroy()
1029+
! end program main
10231030
!```
10241031

10251032
subroutine json_file_load(me, filename, unit)
@@ -1028,7 +1035,7 @@ subroutine json_file_load(me, filename, unit)
10281035

10291036
class(json_file),intent(inout) :: me
10301037
character(kind=CDK,len=*),intent(in) :: filename !! the filename to open
1031-
integer(IK),intent(in),optional :: unit !! the unit number to use
1038+
integer(IK),intent(in),optional :: unit !! the unit number to use (if not present, a newunit is used)
10321039

10331040
call json_parse(file=filename, p=me%p, unit=unit)
10341041

@@ -1770,7 +1777,7 @@ subroutine json_throw_exception(msg)
17701777
!call backtrace() ! gfortran (use -fbacktrace -fall-intrinsics flags)
17711778
!call tracebackqq(-1) ! intel (requires "use ifcore" in this routine)
17721779
write(*,'(A)') '***********************'
1773-
end if
1780+
end if
17741781

17751782
end subroutine json_throw_exception
17761783
!*****************************************************************************************

0 commit comments

Comments
 (0)