@@ -38,57 +38,57 @@ module json_parameters
3838 integer (IK),parameter :: json_string = 7 ! ! String JSON data type
3939
4040 ! special JSON characters
41- character (kind= CK,len=* ),parameter :: space = ' '
42- character (kind= CK,len=* ),parameter :: start_object = ' {'
43- character (kind= CK,len=* ),parameter :: end_object = ' }'
44- character (kind= CK,len=* ),parameter :: start_array = ' ['
45- character (kind= CK,len=* ),parameter :: end_array = ' ]'
46- character (kind= CK,len=* ),parameter :: delimiter = ' ,'
47- character (kind= CK,len=* ),parameter :: colon_char = ' :'
48- character (kind= CK,len=* ),parameter :: start_array_alt = ' (' ! ! for [[json_get_by_path]]
49- character (kind= CK,len=* ),parameter :: end_array_alt = ' )' ! ! for [[json_get_by_path]]
50- character (kind= CK,len=* ),parameter :: root = ' $' ! ! for [[json_get_by_path]]
51- character (kind= CK,len=* ),parameter :: this = ' @' ! ! for [[json_get_by_path]]
52- character (kind= CK,len=* ),parameter :: child = ' .' ! ! for [[json_get_by_path]]
53- character (kind= CK,len=* ),parameter :: bspace = achar (8 )
54- character (kind= CK,len=* ),parameter :: horizontal_tab = achar (9 )
55- character (kind= CK,len=* ),parameter :: newline = achar (10 )
56- character (kind= CK,len=* ),parameter :: formfeed = achar (12 )
57- character (kind= CK,len=* ),parameter :: carriage_return = achar (13 )
58- character (kind= CK,len=* ),parameter :: quotation_mark = achar (34 )
59- character (kind= CK,len=* ),parameter :: slash = achar (47 )
60- character (kind= CK,len=* ),parameter :: backslash = achar (92 )
41+ character (kind= CK,len=* ),parameter :: space = CK_ ' '
42+ character (kind= CK,len=* ),parameter :: start_object = CK_ ' {'
43+ character (kind= CK,len=* ),parameter :: end_object = CK_ ' }'
44+ character (kind= CK,len=* ),parameter :: start_array = CK_ ' ['
45+ character (kind= CK,len=* ),parameter :: end_array = CK_ ' ]'
46+ character (kind= CK,len=* ),parameter :: delimiter = CK_ ' ,'
47+ character (kind= CK,len=* ),parameter :: colon_char = CK_ ' :'
48+ character (kind= CK,len=* ),parameter :: start_array_alt = CK_ ' (' ! ! for [[json_get_by_path]]
49+ character (kind= CK,len=* ),parameter :: end_array_alt = CK_ ' )' ! ! for [[json_get_by_path]]
50+ character (kind= CK,len=* ),parameter :: root = CK_ ' $' ! ! for [[json_get_by_path]]
51+ character (kind= CK,len=* ),parameter :: this = CK_ ' @' ! ! for [[json_get_by_path]]
52+ character (kind= CK,len=* ),parameter :: child = CK_ ' .' ! ! for [[json_get_by_path]]
53+ character (kind= CK,len=* ),parameter :: bspace = achar (8 , kind = CK )
54+ character (kind= CK,len=* ),parameter :: horizontal_tab = achar (9 , kind = CK )
55+ character (kind= CK,len=* ),parameter :: newline = achar (10 , kind = CK )
56+ character (kind= CK,len=* ),parameter :: formfeed = achar (12 , kind = CK )
57+ character (kind= CK,len=* ),parameter :: carriage_return = achar (13 , kind = CK )
58+ character (kind= CK,len=* ),parameter :: quotation_mark = achar (34 , kind = CK )
59+ character (kind= CK,len=* ),parameter :: slash = achar (47 , kind = CK )
60+ character (kind= CK,len=* ),parameter :: backslash = achar (92 , kind = CK )
6161
6262 character (kind= CDK,len=* ),parameter :: default_real_fmt = ' (ss,E26.16E4)'
6363 ! ! default real number format statement (for writing real values to strings and files).
6464 ! ! Note that this can be overridden by calling [[json_initialize]].
6565
66- character (kind= CK,len=* ),parameter :: star = ' *' ! ! for invalid numbers and
67- ! ! list-directed real output
66+ character (kind= CK,len=* ),parameter :: star = CK_ ' *' ! ! for invalid numbers and
67+ ! ! list-directed real output
6868
6969#if defined __GFORTRAN__
7070 ! not parameters due to gfortran bug (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65141)
71- character (kind= CK,len= 26 ),protected :: upper = ' ABCDEFGHIJKLMNOPQRSTUVWXYZ' ! ! uppercase characters
72- character (kind= CK,len= 26 ),protected :: lower = ' abcdefghijklmnopqrstuvwxyz' ! ! lowercase characters
71+ character (kind= CK,len= 26 ),protected :: upper = CK_ ' ABCDEFGHIJKLMNOPQRSTUVWXYZ' ! ! uppercase characters
72+ character (kind= CK,len= 26 ),protected :: lower = CK_ ' abcdefghijklmnopqrstuvwxyz' ! ! lowercase characters
7373#else
74- character (kind= CK,len=* ),parameter :: upper = ' ABCDEFGHIJKLMNOPQRSTUVWXYZ' ! ! uppercase characters
75- character (kind= CK,len=* ),parameter :: lower = ' abcdefghijklmnopqrstuvwxyz' ! ! lowercase characters
74+ character (kind= CK,len=* ),parameter :: upper = CK_ ' ABCDEFGHIJKLMNOPQRSTUVWXYZ' ! ! uppercase characters
75+ character (kind= CK,len=* ),parameter :: lower = CK_ ' abcdefghijklmnopqrstuvwxyz' ! ! lowercase characters
7676#endif
7777
7878#if defined __GFORTRAN__
7979 ! not parameters due to gfortran bug (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65141)
80- character (kind= CK,len= 4 ),protected :: null_str = ' null' ! ! JSON Null variable string
81- character (kind= CK,len= 4 ),protected :: true_str = ' true' ! ! JSON logical True string
82- character (kind= CK,len= 5 ),protected :: false_str = ' false' ! ! JSON logical False string
80+ character (kind= CK,len= 4 ),protected :: null_str = CK_ ' null' ! ! JSON Null variable string
81+ character (kind= CK,len= 4 ),protected :: true_str = CK_ ' true' ! ! JSON logical True string
82+ character (kind= CK,len= 5 ),protected :: false_str = CK_ ' false' ! ! JSON logical False string
8383#else
84- character (kind= CK,len=* ),parameter :: null_str = ' null' ! ! JSON Null variable string
85- character (kind= CK,len=* ),parameter :: true_str = ' true' ! ! JSON logical True string
86- character (kind= CK,len=* ),parameter :: false_str = ' false' ! ! JSON logical False string
84+ character (kind= CK,len=* ),parameter :: null_str = CK_ ' null' ! ! JSON Null variable string
85+ character (kind= CK,len=* ),parameter :: true_str = CK_ ' true' ! ! JSON logical True string
86+ character (kind= CK,len=* ),parameter :: false_str = CK_ ' false' ! ! JSON logical False string
8787#endif
8888
8989 integer , private :: i_ ! ! just a counter for `control_chars` array
9090 character (kind= CK,len=* ),dimension (32 ),parameter :: control_chars = &
91- [(achar (i_),i_= 1 ,31 ), achar (127 )] ! ! Control characters, possibly in unicode
91+ [(achar (i_,kind = CK ),i_= 1 ,31 ), achar (127 ,kind = CK )] ! ! Control characters, possibly in unicode
9292
9393 ! find out the precision of the floating point number system
9494 ! and set safety factors
@@ -108,14 +108,19 @@ module json_parameters
108108 ! ! 6 = sign + leading 0 + decimal + 'E' + exponent sign + 1 extra
109109 character (kind= CDK,len=* ),parameter :: int_fmt = ' (ss,I0)' ! ! minimum width format for integers
110110
111+ integer (IK),parameter :: max_integer_str_len = 256 ! ! maximum string length of an integer.
112+ ! ! This is totally arbitrary (any way
113+ ! ! to get the compiler to tell us this?)
114+
111115 integer (IK),parameter :: chunk_size = 100_IK ! ! for allocatable strings: allocate chunks of this size
112116 integer (IK),parameter :: unit2str = - 1_IK ! ! unit number to cause stuff to be
113117 ! ! output to strings rather than files.
114118 ! ! See 9.5.6.12 in the F2003/08 standard
115119
116120 integer (IK),parameter :: seq_chunk_size = 256_IK ! ! chunk size for reading sequential files
117121
118- integer (IK),parameter :: pushed_char_size = 10_IK ! ! magic number
122+ integer (IK),parameter :: pushed_char_size = 10_IK ! ! size for `pushed_char`
123+ ! ! array in [[json_core]]
119124
120125 end module json_parameters
121126! *****************************************************************************************
0 commit comments