Closed RobertoLorusso closed 3 years ago
I'm sorry for the bother, I figured out that the problem was related to the user-defined type and path to variables in json file, I've substituted it with a simple array of double precision values and works it all. I'm posting the results. Anyway thank you, especially for this great library that you made. Kind Regards
{
FOUND CHILDREN:----> T
Iteration:name:----> snapshots
Iteration:n_children:----> 31
}
snapshots[ 26].position.lat
{
FOUND CHILDREN:----> T
Iteration:name:----> snapshots
Iteration:n_children:----> 31
}
snapshots[ 27].position.lat
{
FOUND CHILDREN:----> T
Iteration:name:----> snapshots
Iteration:n_children:----> 31
}
snapshots[ 28].position.lat
{
FOUND CHILDREN:----> T
Iteration:name:----> snapshots
Iteration:n_children:----> 31
}
snapshots[ 29].position.lat
{
FOUND CHILDREN:----> T
Iteration:name:----> snapshots
Iteration:n_children:----> 31
}
snapshots[ 30].position.lat
{
FOUND CHILDREN:----> T
Iteration:name:----> snapshots
Iteration:n_children:----> 31
}
snapshots[ 31].position.lat
40.424172511133328
17.687390777788888
Verify writing in position different from the first
40.424164177799994
17.687390777788888
lat:------> 40.424172511133328 40.424164177799994 40.424114177799993 40.424064177799998 40.423997511133329 40.423922511133327 40.423847511133332 40.423769733355549 40.423680844466659 40.423586400022216 40.423522511133328 40.423447511133325 40.423447511133325 40.423464177799993 40.423483622244440 40.423500288911107 40.423505844466661 40.423514177799994 40.423555844466662 40.423608622244437 40.423675288911106 40.423747511133328 40.423819733355550 40.423900288911106 40.423922511133327 40.423908622244440 40.423883622244439 40.423886400022219 40.423930844466661 40.423983622244442 40.424030844466664
lon:------> 17.687390777788888 17.687390777788888 17.687415777788885 17.687449111122220 17.687496333344441 17.687546333344443 17.687596333344445 17.687643555566666 17.687701888900001 17.687763000011110 17.687804666677778 17.687854666677779 17.687860222233333 17.687910222233334 17.687976888900000 17.688040777788888 17.688051888899999 17.688043555566665 17.688021333344444 17.687993555566667 17.687954666677776 17.687915777788888 17.687874111122220 17.687826888899998 17.687813000011111 17.687743555566666 17.687657444455553 17.687579666677777 17.687538000011109 17.687515777788889 17.687488000011108
Hello, after a lot of tests and searches inside of the issues I was unable to reach my goal. Once I read the issue (#282) I made changes to my code in order to conform it with the answer given by @jacobwilliams (which, as I can read, is a not verified answer) but the code still doesn't work.
Let me explain: I'm trying to read an array shaped json inside a user-defined type that reflects the json structure following the answer of @jacobwilliams to (#282) but the do-loop works only for the first iteration, whilst inside the next iterations of the loop I found out that the reference to the parent array gets 'lost' (thanks to the json_core%info() subroutine). For every iteration the code prints out the values obtained from json_core%info(): as you can see the value of 'name' variable is correct for the first child and empty for the remaining ones. What I'm doing wrong?
I'm posting the code and the result of execution. As you can see just before the do-loop I try the same instructions used inside of it and the code works (values correctly putted inside user-defined variable)
As requested from the contributing guidelines:
PS:
Kind Regards
CODE RESULT