|
INTERVIEW QUESTIONS
PROGRAMMING LANGUAGES
FORTRAN
DETAILS
Question: What can I do if my 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.
|
|
|
Category |
Fortran Interview Questions & Answers -
Exam Mode /
Learning Mode
|
Rating |
(0.3) By 6575 users |
Added on |
5/15/2014 |
Views |
70855 |
Rate it! |
|
|
Question:
What can I do if my 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. Source: CoolInterview.com
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|
|
Related Questions |
View Answer |
|
Why doesn't Fortran have intrinsic functions for something as simple as factorial?
|
View Answer
|
|
How do we know where various steps go in a Fortran program?
|
View Answer
|
|
Where can I get a Fortran Compiler for an IBM PC?
|
View Answer
|
|
How do you use a logical variable? What is stored there?
|
View Answer
|
|
What directory is used by the compiler for compiling a Fortran Program? Where does f77 live?
|
View Answer
|
|
Why do you put so many lines of empty space in your programs?
|
View Answer
|
|
Do we need to prompt the user for input on our programs?
|
View Answer
|
|
Do we need to prompt the user for input on our programs?
|
View Answer
|
|
Can you give us a complete list of the Fortran commands and what they do?
|
View Answer
|
Please Note: We keep on updating better answers to this site. In case you are looking for Jobs, Pls Click Here Vyoms.com - Best Freshers & Experienced Jobs Website.
View All Fortran Interview Questions & Answers - Exam Mode /
Learning Mode
|