answersLogoWhite

0


Best Answer

The name of the program. For example:

program sum

! This is a comment. Your program's code goes here...

end program sum

User Avatar

Wiki User

8y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the first line of every FORTRAN program and what does it tell the compiler?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

Which command would you use to run a Fortran code?

Fortran is a programming language, which means you write a program in Fortran, and COMPILE it to an EXECUTABLE program. The compiler you use differs depending on which operating system platform you intend to run the program on. If you wish to run the program on a PC using Windows XP, you must first compile it using a specific Fortran-compiler for Windows XP. The result after compiling will be an executable file (with the file-ending .exe). To find a suitable compiler, check out download.com, for instance. Given that you know it is Fortran Code, we can assume that you do not have a compiled one, but just raw Frotran Source code. To compile it, you need a Fortan compiler suitable for both your operating system as well as the version of Fortran the code was written for. There is a free Fortran Compiler for Fortran77 from the GNU Project: For Windows: http://www.geocities.com/Athens/Olympus/5564/ For Unix: http://www.gnu.org/software/fortran/fortran.HTML The above is correct assuming your question is "Given the Fortran source code, how do I run it?" However if your question is "Given the Fortran executable (ProgName.exe) how do I run it?", the is that you run it like any other program. You either: 1 - Double-click on the file name OR 2 - Open a DOS window, go to the directory where the file is and type in the filename with or without the extension .exe OR 3 - You can select Start and Run and type in the filename. Like any "compilable" language it can be used to build an exe or a dll. But a dll MUST be called by another program to run, you can only run a .exe directly. ------------------ In addition the workflow for running a Fortran program on a *nix platform (such as Unix, Linux, or Mac OSx) would be as such: 1) Write given Fortran code with proper extension a) Fortran 77 - *.fb) Fortran 90 - *.f90c) Fortran 95 - *.f95 2) Compile using your compiler suite (showing examples for a few different cases) a) for gfortran as mentioned abovegfortran myfile.f90 -o myExecutableg77 myfile.f77 -o myExecutableb) for OpenMPImpif90 myfile.f90 -o myExecutablempif77 myfile.f77 -o myExecutablec) for Intel Fortranifort myfile.f90 -o myExecutable 3) To run the executable first make sure it is marked as executable, this can by going to the folder in which it was compiled then typing: ls -l You will then see the myExecutable file marked with permissions. Check to see if the executable permission is there. If it is not, you must change permissions to allow it to be executed. This is done by typing: chmod a+x myExecutable 4) Finally to actually run the code you simple add the execution prefix: ./myExecutable This will cause the file to run with output in the current terminal session. Note that if you terminate the terminal/ssh session, the code execution will halt. If you want to execute a large piece of code on lets say a remote computer (or a cluster for scientific computing) then you do the following step instead of 4 4*) To run the executable in backround and log terminal output (if you don't want to keep the terminal window open) you use the following command: nohup ./myExecutable > terminalOuput.txt & This will cause the executable to run in the background, it will the tell terminal not to hang up (nohup) if you close the window, and it will append the terminal output to the file terminalOutput.txt


How do you compile a c program in windows OS?

First, install a C-compiler.


What Was the first high-level programming language designed that could perform complex?

fortran


What is lexical analysis?

A compiler is usually divided into different phases. The input to the compiler is the source program and the output is a target program. Lexical analyzer is the first phase of a compiler which gets source program as input. It scans the source program from left to right and produces tokens as output. A token can be seen as a sequence of characters having a collective meaning. Lexical analyzer also called by names like scanner, linear analyzer etc.


What is the role of the Compiler in a C program?

The compiler takes the file that you have written and produces another file from it. In the case of Pascal programs, for instance, you might write a program called myProg.pas and the Pascal compiler would translate it into the file myProg.exe which you could then run. If you tried to examine the contents of myProg.exe using, say, a text editor, then it would just appear as gobbledy-gook.The compiler has another task apart from translating your program. It also checks it to make sure that it is grammatically correct. Only when it is sure that there are no grammatical errors does it do the translation. Any errors that the compiler detects are called compile-time errors or syntax errors. If it finds so much as one syntax error, it stops compiling and reports the error to you.While the above is true, more simply put, a compiler translates source code to a language the computer understands. A computer does not operate in the language used for source code programming. Basic C code is based on discrete mathematics. The computer operates on what is called Assembly Language or Machine Code, which a computer understands, and contains the specific instructions for the computer to perform the source code's design.

Related questions

What year was the programming language FORTRAN released?

The first FORTRAN compiler, an optimizing compiler, was delivered in April, 1957.


Who was the first founder of programming language?

If you mean a HLL compiler, John Backus of IBM for FORTRAN.


The full meaning of FORTRAN in computer?

Usually thought to mean "Formula Translation", FORTRAN is a blend word name for a software language and compiler whose original full name was "The IBM Mathematical Formula Translating System". The first FORTRAN compiler was released in April of 1957. In 1991, however, the connection to the original meaning was dropped. So from the Fortran 90 of then to the upcoming Fortran 2008, the name is spelled with only the first letter capitalized.


Who invented first compiler?

The first compiler was written by Grace Hopper, in 1952, for the A-0 programming language. The FORTRAN team led by John Backus at IBM is usually credited as having introduced the first complete compiler in 1957.


How do you compile a c program in windows OS?

First, install a C-compiler.


Which command would you use to run a Fortran code?

Fortran is a programming language, which means you write a program in Fortran, and COMPILE it to an EXECUTABLE program. The compiler you use differs depending on which operating system platform you intend to run the program on. If you wish to run the program on a PC using Windows XP, you must first compile it using a specific Fortran-compiler for Windows XP. The result after compiling will be an executable file (with the file-ending .exe). To find a suitable compiler, check out download.com, for instance. Given that you know it is Fortran Code, we can assume that you do not have a compiled one, but just raw Frotran Source code. To compile it, you need a Fortan compiler suitable for both your operating system as well as the version of Fortran the code was written for. There is a free Fortran Compiler for Fortran77 from the GNU Project: For Windows: http://www.geocities.com/Athens/Olympus/5564/ For Unix: http://www.gnu.org/software/fortran/fortran.HTML The above is correct assuming your question is "Given the Fortran source code, how do I run it?" However if your question is "Given the Fortran executable (ProgName.exe) how do I run it?", the is that you run it like any other program. You either: 1 - Double-click on the file name OR 2 - Open a DOS window, go to the directory where the file is and type in the filename with or without the extension .exe OR 3 - You can select Start and Run and type in the filename. Like any "compilable" language it can be used to build an exe or a dll. But a dll MUST be called by another program to run, you can only run a .exe directly. ------------------ In addition the workflow for running a Fortran program on a *nix platform (such as Unix, Linux, or Mac OSx) would be as such: 1) Write given Fortran code with proper extension a) Fortran 77 - *.fb) Fortran 90 - *.f90c) Fortran 95 - *.f95 2) Compile using your compiler suite (showing examples for a few different cases) a) for gfortran as mentioned abovegfortran myfile.f90 -o myExecutableg77 myfile.f77 -o myExecutableb) for OpenMPImpif90 myfile.f90 -o myExecutablempif77 myfile.f77 -o myExecutablec) for Intel Fortranifort myfile.f90 -o myExecutable 3) To run the executable first make sure it is marked as executable, this can by going to the folder in which it was compiled then typing: ls -l You will then see the myExecutable file marked with permissions. Check to see if the executable permission is there. If it is not, you must change permissions to allow it to be executed. This is done by typing: chmod a+x myExecutable 4) Finally to actually run the code you simple add the execution prefix: ./myExecutable This will cause the file to run with output in the current terminal session. Note that if you terminate the terminal/ssh session, the code execution will halt. If you want to execute a large piece of code on lets say a remote computer (or a cluster for scientific computing) then you do the following step instead of 4 4*) To run the executable in backround and log terminal output (if you don't want to keep the terminal window open) you use the following command: nohup ./myExecutable > terminalOuput.txt & This will cause the executable to run in the background, it will the tell terminal not to hang up (nohup) if you close the window, and it will append the terminal output to the file terminalOutput.txt


What Was the first high-level programming language designed that could perform complex?

fortran


What was the first high level language?

The first high-level programming language is often considered to be Fortran (short for "Formula Translation"). Developed by IBM in the 1950s, Fortran was designed to allow for high-level mathematical and scientific computations. Its creation marked a significant departure from low-level machine code programming, enabling programmers to write code in a more human-readable form, which could then be translated into machine code by a compiler.


What are facts about grace Hopper?

Grace Hopper was the first woman in the U.S. to program the first computer in the U.S. She also was the inventor of the compiler


First computer language?

The oldest computer language still in use is Fortran, invented in 1957. The first computer language was assembly language, but the first high level programming language was Plankalkul.


What is lexical analysis?

A compiler is usually divided into different phases. The input to the compiler is the source program and the output is a target program. Lexical analyzer is the first phase of a compiler which gets source program as input. It scans the source program from left to right and produces tokens as output. A token can be seen as a sequence of characters having a collective meaning. Lexical analyzer also called by names like scanner, linear analyzer etc.


What is first procedure oriented language?

The first procedure-oriented programming language is considered to be Fortran (short for Formula Translation). It was developed by IBM in the 1950s for scientific and engineering computations.