What can we do if our lines wrap around to the next line?
Submitted by: AdministratorYou 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.
Submitted by: Administrator
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.
Submitted by: Administrator
Read Online Fortran Job Interview Questions And Answers
Top Fortran Questions
☺ | How does Fortran 90 relate to FORTRAN 77? |
☺ | Why does not Fortran have intrinsic functions for something as simple as factorial? |
☺ | How do we know where various steps go in a Fortran program? |
☺ | Do spaces mater in Fortran equations? |
☺ | What is the advantage of an array over a spreadsheet format? |
Top Coding/Programming Categories
☺ | Python Interview Questions. |
☺ | OOP Interview Questions. |
☺ | Software engineering Interview Questions. |
☺ | PHP Interview Questions. |
☺ | VBA (Visual Basic for Applications) Interview Questions. |