# tofree **Repository Path**: euler37/tofree ## Basic Information - **Project Name**: tofree - **Description**: Fortran 固定格式转自由格式 - **Primary Language**: FORTRAN - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-09-21 - **Last Updated**: 2022-03-02 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # tofree #### 介绍 Fortran 固定格式转自由格式,复制自[此网址](https://jblevins.org/mirror/amiller/to_f90.f90) #### 软件架构 利用链表对语法解析,实现字符串替换 #### 修改 - 替换了由于续行导致的空变量申明 - 替换了将`real` 函数解析为 `REAL(::`类型产生的错误 - 修复了 `double complex` 导致的双精度复数重复定义 - 将`double percision` 替换为 `real(kind=8)` - 将`double complex` 替换为 `complex(kind=8)` #### 安装教程 Linux 下编译使用(使用了sed 命令) gfortran to_f90.f90 -O3 -o to_f90 ./to_f90 输入文件名 #### 使用说明 - bugs - Cannot handle character strings or names broken at the end of lines. - No attempt to convert BLOCKDATA, COMMON or EQUIVALENCE. - Does not convert Hollerith strings, e.g. 31HTHIS IS A COMMENT ... - May do the wrong thing if variable names start with IF or end with DO. - INTENTs are sometimes wrong. In particular, INTENT(IN) arguments are often shown as INTENT(IN OUT). - Cannot handle comment lines in the middle of continued instructions. - Can handle 'character*(*) str' but not 'character str*(*)' - 注意事项 - 只可对完整程序解析,不能解析片段 #### 参与贡献 #### 特技