Can I Install Fortran 95 on Windows 7 for My Computer Science Class?

  • Fortran
  • Thread starter nlsherrill
  • Start date
  • Tags
    Fortran
In summary: You don't need to install it separately.In summary, to compile a program in Fortran 95 using Cygwin, you open Notepad, write the source code, compile it using the gfortran compiler, and then run it. If there's an error, you need to edit the source code until it compiles correctly.
  • #1
nlsherrill
323
1
I am a student who is currently enrolled in a computer science class, and the program we are using is Fortran 95. I was wondering how I could get this program/compiler onto my own computer? I have almost no experience with programming and Fortran so I really want toget this on my own system rather than only being able to use it at school.

Basically every version of it I have used is run off of a Linux system, and you just select an icon on the desktop called "Terminal" and then use a program editor called "gedit" to write the programs. I don't know if this is how all Fortran compilers work or anything, but I am pretty sure If I got my own version it would have to work just like the ones on my school computer.

Basically, I have Window's 7 pro on my laptop. Can I get the same compiler/program for my OS that runs on the Linux system? Someone told me that you could get Linux to run on your Windows 7 OS but I don't know how to do that or how expensive any of this costs.

Any advice would be great.
 
Technology news on Phys.org
  • #2
If all you want is a Linux-like environment for Fortran programming, it's best to install Cygwin. Installing Cygwin may be a bit of a headache (find guides online), but installing Linux will burn you if you're not experienced.

Cygwin gives you an Fortran programming environment nearly identical to what you'll find on the school Linux system. In the installation menu, make sure to set the group "devel" to "install". Then the gfortran compiler will be installed. An icon "Cygwin" will appear on your desktop. That's the equivalent of your "terminal". When you type "gedit", replace it with "Notepad". (Later you may want to try some other text-editors such as Notepad++ for Windows.)

Again, you need to find installation guides online. Basically apart from running setup.exe, you need to set environment variables, and you may need to run "rebase" after the install.
 
  • #3
petergreat said:
If all you want is a Linux-like environment for Fortran programming, it's best to install Cygwin. Installing Cygwin may be a bit of a headache (find guides online), but installing Linux will burn you if you're not experienced.

Cygwin gives you an Fortran programming environment nearly identical to what you'll find on the school Linux system. In the installation menu, make sure to set the group "devel" to "install". Then the gfortran compiler will be installed. An icon "Cygwin" will appear on your desktop. That's the equivalent of your "terminal". When you type "gedit", replace it with "Notepad". (Later you may want to try some other text-editors such as Notepad++ for Windows.)

Again, you need to find installation guides online. Basically apart from running setup.exe, you need to set environment variables, and you may need to run "rebase" after the install.

Alright I installed Cygwin and got the Notepad up and all. Are the other commands different? Like how to I open a notepad document in the compiler and compile it and all?
 
  • #4
I have no idea whether cygwin comes with gcc or not but check it out.

You use any editor (like notepad) to make the source code files and the compiler to compile it to machine code.
 
  • #5
nlsherrill said:
Alright I installed Cygwin and got the Notepad up and all. Are the other commands different? Like how to I open a notepad document in the compiler and compile it and all?

1. Open Cygwin, launch Notepad
Code:
notepad hello.f90 &
2. Write a program, click file->save. Do not close Notepad, so you can continue editing later.
3. Compile
Code:
gfortran hello.f90 -o hello
If there's any error, edit the program until it compiles correctly.
4. Run it.
Code:
./hello
Hopefully you can see the output of your program.

@Santa1: Cygwin comes with the full GCC suite.
 

FAQ: Can I Install Fortran 95 on Windows 7 for My Computer Science Class?

What is Fortran 95?

Fortran 95 is a programming language used for scientific and engineering applications. It is an updated version of the original Fortran language, and was released in 1995.

What are the main differences between Fortran 95 and its previous versions?

Fortran 95 introduced several new features, including improved control structures, support for modules and pointers, and the ability to use character strings of variable length. It also removed some obsolete features from previous versions.

Is Fortran 95 still relevant in modern programming?

Yes, Fortran 95 is still widely used in scientific and engineering fields, particularly for its efficient handling of mathematical and scientific computations. It has also been updated with newer versions, such as Fortran 2003 and Fortran 2018.

What are the main advantages of using Fortran 95?

Fortran 95 is known for its efficient handling of numerical calculations, making it a popular choice for scientific and engineering applications. It also has a large library of built-in functions and is highly portable across different platforms.

Are there any limitations to using Fortran 95?

One limitation of Fortran 95 is its lack of support for object-oriented programming, which may be a disadvantage for some programmers. It also has a stricter syntax compared to other programming languages, making it less user-friendly for beginners.

Similar threads

Replies
1
Views
2K
Replies
14
Views
4K
Replies
5
Views
1K
Replies
13
Views
4K
Replies
16
Views
3K
Replies
4
Views
7K
Replies
1
Views
2K
Back
Top