开发者

C preprocessor macro to convert string of Fortran program to lowercase?

I would like to do the following:

In a FORTRAN program

call myPackageFunction("MPI_User_function")

...shall be transf开发者_运维问答ered BY A C PREPROCESSOR MAKRO to...

call myPackageFunction("mpi_user_function_")

The reason why I want to do that is that the user of my package (an average MATLAB and Fortran user) doesn't have to know about the name mangling of Fortran, but in the same time doing this task for the user shall not slow done the package function.

Does someone know how I could do that? I would be most grateful for any help!


The C preprocessor cannot do this sort of transformation.

You will probably need to write a custom script that does this, that is automatically called by your build system before the compiler runs.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜