各位老师们好,我在学习Fortran程序时遇到一个问题,我想把写在文件里的一个自由格式的矩阵进行格式化后输出在屏幕上,以下是我的源代码GaussFmtMat.f90。在Codeblocks中利用gfortran编译器编译完成后,运行exe程序,一旦向其中拖入mat.txt,程序立刻闪退,在编译器中运行时还有以下提示:
||=== Build file: "no target" in "no project" (compiler: unknown) ===|
||Warning: Nonexistent include directory 'D:\Documents\Fortran_Exercise\GaussFmtMat.os_output_dir' [-Wmissing-include-dirs]|
||=== Build finished: 0 error(s), 1 warning(s) (0 minute(s), 0 second(s)) ===|
At line 32 of file D:\Documents\Fortran_Exercise\GaussFmtMat.f90 (unit = 10, file = 'D:\Documents\Fortran_Exercise\mat.txt')Fortran runtime error: End of file
Error termination. Backtrace:
Process returned 2 (0x2) execution time : 10.853 s