Fortran Programming Question:
Download Job Interview Questions and Answers PDF
Do spaces mater in Fortran equations?
Answer:
No. Spaces are generally added for clarity. Some compilers get upset if you write things like " INTEGERI,J" rather than INTEGER I,J". Simple neatness will keep you out of these problems. Remember that a space is required in column 6 if you aren't continuing from the previous line. The following are all equivalent:
x=x*y**2*sin(x)
x=x * y**2 * sin(x)
x = x * y ** 2 * sin ( x )
x=x*y**2*sin(x)
x=x * y**2 * sin(x)
x = x * y ** 2 * sin ( x )
Download Fortran Interview Questions And Answers
PDF
Previous Question | Next Question |
Can you give us a complete list of the Fortran commands and what they do? | What is the advantage of an array over a spreadsheet format? |