jacobwilliams / json-fortran

A Modern Fortran JSON API
https://jacobwilliams.github.io/json-fortran/
Other
332 stars 83 forks source link

On Definition of operator [] #522

Closed AliE89 closed 1 year ago

AliE89 commented 1 year ago

Hello Jacob,

Just out of curiosity, would it be possible to define an operator getting the values from the dictionary like in python? (e.g. value = dict[key])

thanks

jacobwilliams commented 1 year ago

That's not possible in Fortran. The square brackets are used for coarrays.