@@ -3880,7 +3880,7 @@ subroutine json_add_double_vec_by_path(json,me,path,value,found,was_created)
38803880 class(json_core),intent (inout ) :: json
38813881 type (json_value),pointer :: me ! ! the JSON structure
38823882 character (kind= CK,len=* ),intent (in ) :: path ! ! the path to the variable
3883- real (RK),dimension (:),intent (in ) :: value ! ! the vector to add
3883+ real (RK),dimension (:),intent (in ) :: value ! ! the vector to add
38843884 logical (LK),intent (out ),optional :: found ! ! if the variable was found
38853885 logical (LK),intent (out ),optional :: was_created ! ! if the variable had to be created
38863886
@@ -5294,8 +5294,8 @@ recursive subroutine json_value_print(json,p,iunit,str,indent,&
52945294 logical (LK) :: is_array ! ! if this is an element in an array
52955295 integer (IK) :: var_type ! ! for getting the variable type of children
52965296 integer (IK) :: var_type_prev ! ! for getting the variable type of children
5297- logical (LK) :: is_vector ! ! if all elements of a vector
5298- ! ! are scalars of the same type
5297+ logical (LK) :: is_vector ! ! if all elements of a vector
5298+ ! ! are scalars of the same type
52995299 character (kind= CK,len= :),allocatable :: str_escaped ! ! escaped version of
53005300 ! ! `name` or `str_value`
53015301
@@ -8938,7 +8938,7 @@ recursive subroutine parse_value(json, unit, str, value)
89388938 type (json_value),pointer :: value ! ! JSON data that is extracted
89398939
89408940 logical (LK) :: eof ! ! end-of-file flag
8941- character (kind= CK,len= 1 ) :: c ! ! character read from file (or string)
8941+ character (kind= CK,len= 1 ) :: c ! ! character read from file (or string) by [[pop_char]]
89428942#if defined __GFORTRAN__
89438943 character (kind= CK,len= :),allocatable :: tmp ! ! this is a work-around for a bug
89448944 ! ! in the gfortran 4.9 compiler.
@@ -9227,8 +9227,8 @@ subroutine wrap_json_value_create_string(json,p,val,name,trim_str,adjustl_str)
92279227 type (json_value),pointer :: p
92289228 character (kind= CDK,len=* ),intent (in ) :: val
92299229 character (kind= CDK,len=* ),intent (in ) :: name
9230- logical (LK),intent (in ),optional :: trim_str ! ! if TRIM() should be called for the `val`
9231- logical (LK),intent (in ),optional :: adjustl_str ! ! if ADJUSTL() should be called for the `val`
9230+ logical (LK),intent (in ),optional :: trim_str ! ! if TRIM() should be called for the `val`
9231+ logical (LK),intent (in ),optional :: adjustl_str ! ! if ADJUSTL() should be called for the `val`
92329232
92339233 call json% create_string(p,to_unicode(val),to_unicode(name),trim_str,adjustl_str)
92349234
@@ -9432,7 +9432,7 @@ subroutine to_integer(json,p,val,name)
94329432 if (present (val)) then
94339433 p% int_value = val
94349434 else
9435- p% int_value = 0 ! default value
9435+ p% int_value = 0_IK ! default value
94369436 end if
94379437
94389438 ! name:
@@ -9616,9 +9616,9 @@ recursive subroutine parse_object(json, unit, str, parent)
96169616 character (kind= CK,len=* ),intent (in ) :: str ! ! JSON string (if parsing from a string)
96179617 type (json_value),pointer :: parent ! ! the parsed object will be added as a child of this
96189618
9619- type (json_value),pointer :: pair
9620- logical (LK) :: eof
9621- character (kind= CK,len= 1 ) :: c
9619+ type (json_value),pointer :: pair ! ! temp variable
9620+ logical (LK) :: eof ! ! end of file flag
9621+ character (kind= CK,len= 1 ) :: c ! ! character returned by [[pop_char]]
96229622#if defined __GFORTRAN__
96239623 character (kind= CK,len= :),allocatable :: tmp ! ! this is a work-around for a bug
96249624 ! ! in the gfortran 4.9 compiler.
@@ -9719,9 +9719,9 @@ recursive subroutine parse_array(json, unit, str, array)
97199719 character (kind= CK,len=* ),intent (in ) :: str ! ! JSON string (if parsing from a string)
97209720 type (json_value),pointer :: array
97219721
9722- type (json_value),pointer :: element
9723- logical (LK) :: eof
9724- character (kind= CK,len= 1 ) :: c
9722+ type (json_value),pointer :: element ! ! temp variable for array element
9723+ logical (LK) :: eof ! ! end of file flag
9724+ character (kind= CK,len= 1 ) :: c ! ! character returned by [[pop_char]]
97259725
97269726 do
97279727
@@ -9783,14 +9783,17 @@ subroutine parse_string(json, unit, str, string)
97839783 character (kind= CK,len=* ),intent (in ) :: str ! ! JSON string (if parsing from a string)
97849784 character (kind= CK,len= :),allocatable ,intent (out ) :: string ! ! the string (unescaped if necessary)
97859785
9786- logical (LK) :: eof, is_hex, escape
9787- character (kind= CK,len= 1 ) :: c
9788- character (kind= CK,len= 4 ) :: hex
9789- integer (IK) :: i
9790- integer (IK) :: ip ! ! index to put next character,
9791- ! ! to speed up by reducing the number of character string reallocations.
9786+ logical (LK) :: eof ! ! end of file flag
9787+ logical (LK) :: is_hex ! ! it is a hex string
9788+ logical (LK) :: escape ! ! for escape string parsing
9789+ character (kind= CK,len= 1 ) :: c ! ! character returned by [[pop_char]]
9790+ character (kind= CK,len= 4 ) :: hex ! ! hex string
9791+ integer (IK) :: i ! ! counter
9792+ integer (IK) :: ip ! ! index to put next character,
9793+ ! ! to speed up by reducing the number
9794+ ! ! of character string reallocations.
97929795 character (kind= CK,len= :),allocatable :: string_unescaped ! ! temp variable
9793- character (kind= CK,len= :),allocatable :: error_message ! ! for string unescaping
9796+ character (kind= CK,len= :),allocatable :: error_message ! ! for string unescaping
97949797
97959798 ! at least return a blank string if there is a problem:
97969799 string = repeat (space, chunk_size)
@@ -9903,9 +9906,10 @@ subroutine parse_for_chars(json, unit, str, chars)
99039906 character (kind= CK,len=* ),intent (in ) :: str ! ! JSON string (if parsing from a string)
99049907 character (kind= CK,len=* ),intent (in ) :: chars ! ! the string to check for.
99059908
9906- integer (IK) :: i, length
9907- logical (LK) :: eof
9908- character (kind= CK,len= 1 ) :: c
9909+ integer (IK) :: i ! ! counter
9910+ integer (IK) :: length ! ! trimmed length of `chars`
9911+ logical (LK) :: eof ! ! end of file flag
9912+ character (kind= CK,len= 1 ) :: c ! ! character returned by [[pop_char]]
99099913
99109914 if (.not. json% exception_thrown) then
99119915
@@ -9949,16 +9953,16 @@ subroutine parse_number(json, unit, str, value)
99499953 character (kind= CK,len=* ),intent (in ) :: str ! ! JSON string (if parsing from a string)
99509954 type (json_value),pointer :: value
99519955
9952- character (kind= CK,len= :),allocatable :: tmp
9953- character (kind= CK,len= 1 ) :: c
9954- logical (LK) :: eof
9955- real (RK) :: rval
9956- integer (IK) :: ival
9957- logical (LK) :: first
9958- logical (LK) :: is_integer
9959- integer (IK) :: ip ! ! index to put next character
9960- ! ! [to speed up by reducing the number
9961- ! ! of character string reallocations]
9956+ character (kind= CK,len= :),allocatable :: tmp ! ! temp string
9957+ character (kind= CK,len= 1 ) :: c ! ! character returned by [[pop_char]]
9958+ logical (LK) :: eof ! ! end of file flag
9959+ real (RK) :: rval ! ! real value
9960+ integer (IK) :: ival ! ! integer value
9961+ logical (LK) :: first ! ! first character
9962+ logical (LK) :: is_integer ! ! it is an integer
9963+ integer (IK) :: ip ! ! index to put next character
9964+ ! ! [to speed up by reducing the number
9965+ ! ! of character string reallocations]
99629966
99639967 if (.not. json% exception_thrown) then
99649968
@@ -10241,7 +10245,8 @@ subroutine json_print_error_message(json,io_unit)
1024110245 implicit none
1024210246
1024310247 class(json_core),intent (inout ) :: json
10244- integer , intent (in ), optional :: io_unit
10248+ integer , intent (in ), optional :: io_unit ! ! unit number for
10249+ ! ! printing error message
1024510250
1024610251 character (kind= CK,len= :),allocatable :: error_msg ! ! error message
1024710252 logical :: status_ok ! ! false if there were any errors thrown
0 commit comments