![]() ![]() ![]() This form of module file could be distributed unmodified as a library API.Īlso see Library distribution for related discussion on. Submodules make it possible for a parent module to define all procedure interfaces with no source code. This should be easy to implement for shared libraries, where the mod-file distribution is most problematic. It is better to check the object files for compatibility. mod file also ensures a matching compiler version. mod files are for optimizing the compile process, and do not need to be distributed with the library. This would work more like C pre-compiled headers, where library. There would need to be a standard convention for naming the stripped module “header” files.Ī better mechanism is for compilers to provide a feature to generate mod files from the module source without actually compiling the source code, and allowing for stripped procedure bodies. The only caveat to this approach is that module interfaces are referenced by the module name, and not the file name. The stripped module source file can then be the actual interface specification, and could include useful comments as in C headers. A Fortran compiler could easily use the module source as the interface spec, allowing for procedure bodies to be deleted. A Fortran program is made of a collection of program units like a main program, modules, and external subprograms or procedures. However, they are only used for optimization, and need not be distributed. The MOD file is similar to a pre-compiled header in C. ![]() The compiler could instead parse the module source directly instead of storing it in and compiler and version dependent data file. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |