Fortran Programming Question:
Download Questions PDF

What can we do if our lines wrap around to the next line?

Answer:

You have to get a feel for the location of the 72nd character position on the screen, or do a lot of counting. Once you hit column 72, you must hit the RETURN key, put some character (I like & or #) in column 6 of the next line then pick up typing where you left off. I usually stop before column 72 at some natural break point between variables:

123456789012345678901234567890123456789012345678901234567890123456789012
IF ( (X.LT.2.0.AND.Y.GT.30.0).OR.(X.GT.1000.0.AND.Y.LT.-40.))
& PRINT *,' CALCULATION IS IN TROUBLE'

Since Fortran tends to ignore blanks, the extra ones in the above 2 lines don't cause problems.

Download Fortran Interview Questions And Answers PDF

Previous QuestionNext Question
Why does not Fortran have intrinsic functions for something as simple as factorial?What is the advantage of an array over a spreadsheet format?