@@ -1920,9 +1920,9 @@ recursive subroutine json_value_print(this,iunit,indent,need_comma,colon,str)
1920
1920
1921
1921
nullify(element)
1922
1922
1923
- associate (d = > this% data )
1923
+ ! associate (d => this%data)
1924
1924
1925
- select case (d % var_type)
1925
+ select case (this % data % var_type)
1926
1926
1927
1927
case (json_object)
1928
1928
@@ -1973,8 +1973,8 @@ recursive subroutine json_value_print(this,iunit,indent,need_comma,colon,str)
1973
1973
1974
1974
case (json_string)
1975
1975
1976
- if (allocated (d % str_value)) then
1977
- call write_it( repeat (space, spaces)// ' "' // trim (d % str_value)// ' "' , comma= print_comma )
1976
+ if (allocated (this % data % str_value)) then
1977
+ call write_it( repeat (space, spaces)// ' "' // trim (this % data % str_value)// ' "' , comma= print_comma )
1978
1978
else
1979
1979
call throw_exception(' Error in json_value_print: this%value_string not allocated' )
1980
1980
call cleanup()
@@ -1983,21 +1983,21 @@ recursive subroutine json_value_print(this,iunit,indent,need_comma,colon,str)
1983
1983
1984
1984
case (json_logical)
1985
1985
1986
- if (d % log_value) then
1986
+ if (this % data % log_value) then
1987
1987
call write_it( repeat (space, spaces)// ' true' , comma= print_comma )
1988
1988
else
1989
1989
call write_it( repeat (space, spaces)// ' false' , comma= print_comma )
1990
1990
end if
1991
1991
1992
1992
case (json_integer)
1993
1993
1994
- call integer_to_string(d % int_value,tmp)
1994
+ call integer_to_string(this % data % int_value,tmp)
1995
1995
1996
1996
call write_it( repeat (space, spaces)// trim (tmp), comma= print_comma )
1997
1997
1998
1998
case (json_real)
1999
1999
2000
- call real_to_string(d % dbl_value,tmp)
2000
+ call real_to_string(this % data % dbl_value,tmp)
2001
2001
2002
2002
call write_it( repeat (space, spaces)// trim (tmp), comma= print_comma )
2003
2003
@@ -2007,7 +2007,7 @@ recursive subroutine json_value_print(this,iunit,indent,need_comma,colon,str)
2007
2007
2008
2008
end select
2009
2009
2010
- end associate
2010
+ ! end associate
2011
2011
2012
2012
call cleanup()
2013
2013
@@ -2362,22 +2362,22 @@ subroutine json_get_integer(this, path, value, found)
2362
2362
2363
2363
else
2364
2364
2365
- associate (d = > p% data )
2366
- select case (d % var_type)
2365
+ ! associate (d => p%data)
2366
+ select case (p % data % var_type)
2367
2367
case (json_integer)
2368
- value = d % int_value
2368
+ value = p % data % int_value
2369
2369
case (json_real)
2370
- value = d % dbl_value
2370
+ value = p % data % dbl_value
2371
2371
case (json_logical)
2372
- if (d % log_value) then
2372
+ if (p % data % log_value) then
2373
2373
value = 1
2374
2374
else
2375
2375
value = 0
2376
2376
end if
2377
2377
case default
2378
2378
call throw_exception(' Error in get_integer: Unable to resolve value to integer: ' // trim (path))
2379
2379
end select
2380
- end associate
2380
+ ! end associate
2381
2381
2382
2382
nullify(p)
2383
2383
@@ -2441,22 +2441,22 @@ subroutine json_get_double(this, path, value, found)
2441
2441
2442
2442
else
2443
2443
2444
- associate (d = > p% data )
2445
- select case (d % var_type)
2444
+ ! associate (d => p%data)
2445
+ select case (p % data % var_type)
2446
2446
case (json_integer)
2447
- value = d % int_value
2447
+ value = p % data % int_value
2448
2448
case (json_real)
2449
- value = d % dbl_value
2449
+ value = p % data % dbl_value
2450
2450
case (json_logical)
2451
- if (d % log_value) then
2451
+ if (p % data % log_value) then
2452
2452
value = 1.0_wp
2453
2453
else
2454
2454
value = 0.0_wp
2455
2455
end if
2456
2456
case default
2457
2457
call throw_exception(' Error in json_get_double: Unable to resolve value to double: ' // trim (path))
2458
2458
end select
2459
- end associate
2459
+ ! end associate
2460
2460
2461
2461
nullify(p)
2462
2462
@@ -2520,16 +2520,16 @@ subroutine json_get_logical(this, path, value, found)
2520
2520
2521
2521
else
2522
2522
2523
- associate (d = > p% data )
2524
- select case (d % var_type)
2523
+ ! associate (d => p%data)
2524
+ select case (p % data % var_type)
2525
2525
case (json_integer)
2526
- value = (d % int_value > 0 )
2526
+ value = (p % data % int_value > 0 )
2527
2527
case (json_logical)
2528
- value = d % log_value
2528
+ value = p % data % log_value
2529
2529
case default
2530
2530
call throw_exception(' Error in json_get_logical: Unable to resolve value to logical: ' // trim (path))
2531
2531
end select
2532
- end associate
2532
+ ! end associate
2533
2533
2534
2534
nullify(p)
2535
2535
@@ -2597,13 +2597,13 @@ subroutine json_get_chars(this, path, value, found)
2597
2597
2598
2598
else
2599
2599
2600
- associate (d = > p% data )
2601
- select case (d % var_type)
2600
+ ! associate (d => p%data)
2601
+ select case (p % data % var_type)
2602
2602
case (json_string)
2603
- if (allocated (d % str_value)) then
2603
+ if (allocated (p % data % str_value)) then
2604
2604
2605
2605
! get the value as is:
2606
- s = d % str_value
2606
+ s = p % data % str_value
2607
2607
2608
2608
! Now, have to remove the escape characters:
2609
2609
!
@@ -2726,7 +2726,7 @@ subroutine json_get_chars(this, path, value, found)
2726
2726
! Note: for the other cases, we could do val to string conversions... TO DO
2727
2727
2728
2728
end select
2729
- end associate
2729
+ ! end associate
2730
2730
2731
2731
end if
2732
2732
@@ -2798,8 +2798,8 @@ subroutine json_get_array(this, path, array_callback, found)
2798
2798
2799
2799
else
2800
2800
2801
- associate (d = > p% data )
2802
- select case (d % var_type)
2801
+ ! associate (d => p%data)
2802
+ select case (p % data % var_type)
2803
2803
case (json_array)
2804
2804
count = json_value_count(p)
2805
2805
do i = 1 , count
@@ -2809,7 +2809,7 @@ subroutine json_get_array(this, path, array_callback, found)
2809
2809
case default
2810
2810
call throw_exception(' Error in json_get_array: Resolved value is not an array. ' // trim (path))
2811
2811
end select
2812
- end associate
2812
+ ! end associate
2813
2813
2814
2814
! cleanup:
2815
2815
if (associated (p)) nullify(p)
@@ -2969,14 +2969,14 @@ recursive subroutine parse_value(unit, value)
2969
2969
! string
2970
2970
call to_string(value) ! allocate class
2971
2971
2972
- associate (d = > value% data )
2973
- ! select type (d )
2974
- select case (d % var_type)
2972
+ ! associate (d => value%data)
2973
+ ! select type (value%data )
2974
+ select case (value % data % var_type)
2975
2975
! type is (json_string)
2976
2976
case (json_string)
2977
- call parse_string(unit, d % str_value)
2977
+ call parse_string(unit, value % data % str_value)
2978
2978
end select
2979
- end associate
2979
+ ! end associate
2980
2980
2981
2981
case (' t' )
2982
2982
@@ -3036,16 +3036,16 @@ subroutine to_logical(me,val,name)
3036
3036
logical ,intent (in ),optional :: val
3037
3037
3038
3038
! set type and value:
3039
- associate (d = > me% data )
3040
- call d % destroy()
3041
- d % var_type = json_logical
3042
- allocate (d % log_value)
3039
+ ! associate (d => me%data)
3040
+ call me % data % destroy()
3041
+ me % data % var_type = json_logical
3042
+ allocate (me % data % log_value)
3043
3043
if (present (val)) then
3044
- d % log_value = val
3044
+ me % data % log_value = val
3045
3045
else
3046
- d % log_value = .false. ! default value
3046
+ me % data % log_value = .false. ! default value
3047
3047
end if
3048
- end associate
3048
+ ! end associate
3049
3049
3050
3050
! name:
3051
3051
if (present (name)) me% name = trim (name)
@@ -3076,16 +3076,16 @@ subroutine to_integer(me,val,name)
3076
3076
integer ,intent (in ),optional :: val
3077
3077
3078
3078
! set type and value:
3079
- associate (d = > me% data )
3080
- call d % destroy()
3081
- d % var_type = json_integer
3082
- allocate (d % int_value)
3079
+ ! associate (d => me%data)
3080
+ call me % data % destroy()
3081
+ me % data % var_type = json_integer
3082
+ allocate (me % data % int_value)
3083
3083
if (present (val)) then
3084
- d % int_value = val
3084
+ me % data % int_value = val
3085
3085
else
3086
- d % int_value = 0 ! default value
3086
+ me % data % int_value = 0 ! default value
3087
3087
end if
3088
- end associate
3088
+ ! end associate
3089
3089
3090
3090
! name:
3091
3091
if (present (name)) me% name = trim (name)
@@ -3117,16 +3117,16 @@ subroutine to_real(me,val,name)
3117
3117
real (wp),intent (in ),optional :: val
3118
3118
3119
3119
! set type and value:
3120
- associate (d = > me% data )
3121
- call d % destroy()
3122
- d % var_type = json_real
3123
- allocate (d % dbl_value)
3120
+ ! associate (d => me%data)
3121
+ call me % data % destroy()
3122
+ me % data % var_type = json_real
3123
+ allocate (me % data % dbl_value)
3124
3124
if (present (val)) then
3125
- d % dbl_value = val
3125
+ me % data % dbl_value = val
3126
3126
else
3127
- d % dbl_value = 0.0_wp ! default value
3127
+ me % data % dbl_value = 0.0_wp ! default value
3128
3128
end if
3129
- end associate
3129
+ ! end associate
3130
3130
3131
3131
! name:
3132
3132
if (present (name)) me% name = trim (name)
@@ -3158,15 +3158,15 @@ subroutine to_string(me,val,name)
3158
3158
character (len=* ),intent (in ),optional :: val
3159
3159
3160
3160
! set type and value:
3161
- associate (d = > me% data )
3162
- call d % destroy()
3163
- d % var_type = json_string
3161
+ ! associate (d => me%data)
3162
+ call me % data % destroy()
3163
+ me % data % var_type = json_string
3164
3164
if (present (val)) then
3165
- d % str_value = val
3165
+ me % data % str_value = val
3166
3166
else
3167
- d % str_value = ' ' ! default value
3167
+ me % data % str_value = ' ' ! default value
3168
3168
end if
3169
- end associate
3169
+ ! end associate
3170
3170
3171
3171
! name:
3172
3172
if (present (name)) me% name = trim (name)
@@ -3197,10 +3197,10 @@ subroutine to_null(me,name)
3197
3197
character (len=* ),intent (in ),optional :: name
3198
3198
3199
3199
! set type and value:
3200
- associate (d = > me% data )
3201
- call d % destroy()
3202
- d % var_type = json_null
3203
- end associate
3200
+ ! associate (d => me%data)
3201
+ call me % data % destroy()
3202
+ me % data % var_type = json_null
3203
+ ! end associate
3204
3204
3205
3205
! name:
3206
3206
if (present (name)) me% name = trim (name)
@@ -3231,10 +3231,10 @@ subroutine to_object(me,name)
3231
3231
character (len=* ),intent (in ),optional :: name
3232
3232
3233
3233
! set type and value:
3234
- associate (d = > me% data )
3235
- call d % destroy()
3236
- d % var_type = json_object
3237
- end associate
3234
+ ! associate (d => me%data)
3235
+ call me % data % destroy()
3236
+ me % data % var_type = json_object
3237
+ ! end associate
3238
3238
3239
3239
! name:
3240
3240
if (present (name)) me% name = trim (name)
@@ -3264,10 +3264,10 @@ subroutine to_array(me,name)
3264
3264
character (len=* ),intent (in ),optional :: name
3265
3265
3266
3266
! set type and value:
3267
- associate (d = > me% data )
3268
- call d % destroy()
3269
- d % var_type = json_array
3270
- end associate
3267
+ ! associate (d => me%data)
3268
+ call me % data % destroy()
3269
+ me % data % var_type = json_array
3270
+ ! end associate
3271
3271
3272
3272
! name:
3273
3273
if (present (name)) me% name = trim (name)
0 commit comments