jacopo-chevallard/FortranParser

Support for real128

Opened this issue · 5 comments

@jacopo-chevallard

Dear Jacopo,

thank you very much for sharing your work it is really appreciated.

I am going to use this library into our project WenOOF. Before, I would like to know some details, in particular it could be useful to have the possibility to parse expression like 109./3034. in real128 precision.

  • Does FortranParser support real128 expression?
  • Does FortranParser support Fortran kind specification like 1._real64?

My best regards.

Hi, as you can see from FortranParser_parameters.f90, FortranParser currently supports only one kind of real

INTEGER, PARAMETER :: rn = selected_real_kind(p=6,r=37) 

You can change the selected_real_kind to match your needs, while supporting different types would require a more extensive change of the code

@jacopo-chevallard

Thank you for your fast replay. If you accept PR, I can try to add such a feature for you.

Sure, I only did minimal modifications to the original code (which I didn't write myself), just to make it OO, hence any improvement is more than welcome!

FYI: I also did an update to this original code some time ago. I dug it up and cleaned it up a bit, and here it is. I think it's similar to what you did.

@jacobwilliams Jacob, thank you very much, I'll check also your library. OT: I sent you a message on gitter, can you read when you have time/want?

Cheers