开发者

How to run g95 executable files in Mac OS X terminal

I am completely new to this game, so please be gentle ;-)

I made an example program in Fortran 90, let's call it 'program.f90'. I compile it:

g95 program.f90

It creates an executable called a.out.

How do I run this? It is supposed to print something to the scr开发者_开发问答een, and get input from me, but I cannot figure out how to!


In the same terminal as you ran g95, type ./a.out - this should then read input from your terminal and write output to the terminal.


Try this:

% ./a.out
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜