Using Compaq Visual Fortran

Start the Visual Fortran development environment:

Once the environment is loaded, you should see the following screen:

To create new code, type |File|New.  You should see the following screen:

Select "Fortran Console Application" and fill out the project name, say "test1" - Please make sure you are storing your files in your own directory (F:\PANAGIOT in my case).  In the next screen, select "An empty project":

Clear the warning message about "No files are being added to your project" and select |File|New|Fortran Free Format Source File| and type in a file name for your code:

 

Now type in the code:

Now select |Buid|Compile| and you will see that two warnings (for the type mismatch) are generated.  Ignore them for the moment and select
|Build|Build| to produce an executable version, and then |Build|Execute| to run your program.  The answer you get:

is, of course, not what you would expect when 2 is added to 3; the error is the "type mismatch" between the variable declarations in the calling program and the function.