Passing c arrays into fortran as a variable sized matrix

前端 未结 2 902
旧巷少年郎
旧巷少年郎 2021-01-19 15:19

So, i\'ve been commissioned to translate some fortran subroutines into C. These subroutines are being called as part of the control flow of a large porgram based primarily

2条回答
  •  终归单人心
    2021-01-19 15:58

    Have you considered the Fortran ISO C Binding? I've had very good results with it to interface Fortran and C in both directions. My preference is to avoid rewriting existing, tested code. There are a few types that can't be transferred with the current version of the ISO C Binding, so a translation might be necessary.

提交回复
热议问题