Skip to content

505 version 2 #516

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 21 additions & 2 deletions src/json_module.F90
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,32 @@ module json_module

implicit none

character(kind=json_CK,len=5),protected :: json_fortran_version = '8.2.5'
character(kind=json_CK,len=*),parameter,private :: version = '8.2.5'
!! JSON-Fortran version.
!!
!!@note This string should match the one in the `.VERSION` file (which is used
!! for the documentation generation.)
!! for the documentation generation.)

public

contains
!*****************************************************************************************

!*****************************************************************************************
!>
! Returns the JSON-Fortran version string.

function json_fortran_version() result(ver)

implicit none

character(len=:),allocatable :: ver !! JSON-Fortran version string

ver = version

end function json_fortran_version
!*****************************************************************************************

!*****************************************************************************************
end module json_module
!*****************************************************************************************
2 changes: 1 addition & 1 deletion src/tests/jf_test_01.F90
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ subroutine test_1(error_cnt)
write(error_unit,'(A)') '================================='
write(error_unit,'(A)') ''

write(error_unit,'(A)') 'JSON-Fortran version: '//json_fortran_version
write(error_unit,'(A)') 'JSON-Fortran version: '//json_fortran_version()

! parse the json file:
write(error_unit,'(A)') ''
Expand Down