Fortran 90创建目录语法错误 [英] Fortran 90 create directory syntax error

查看:215
本文介绍了Fortran 90创建目录语法错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我以为我发现如何在这篇文章中创建目录

I thought I found out how to create directories in this post

在FORTRAN中创建名称包含实数的目录

但是当我尝试创建我的Fortran 90程序中的目录

But when I tried to create a directory in my Fortran 90 program

call system('mkdir -p out/test')

call system('mkdir out/test')

我没有得到任何编译错误或警告,但我得到以下运行时错误:

I don't get any compilation errors or warnings, but I get the following runtime error:

The syntax of the command is incorrect.

任何想法有什么问题?任何帮助都非常感谢!

Any idea what is wrong? Any help is greatly appreciated!

推荐答案

从错误信息中我假设您正在使用Windows。然后,您必须使用 \ 作为文件夹分隔符:

From the error message I assume you are using Windows. Then, you have to use \ as a folder separator:

call system('mkdir out\test')

另外, -p (创建父文件夹的Unix选项)对Windows无效(也不是必需的)。

Also, -p (the Unix option to create parent folders) is invalid for Windows (and also not required).

这篇关于Fortran 90创建目录语法错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆