Fortran Programming Question:
Download Questions PDF

How do you use a logical variable? What is stored there?

Answer:

Most frequently, logical variables are used in association with IF statements. When you want to set a logical variable LVAR to true you use "LVAR=.TRUE.". For false use "LVAR=.FALSE." In practice the computer usually stores an integer 0 in memory for false and integer 1 for true. The normal logical variable occupies 1 byte of space.

Download Fortran Interview Questions And Answers PDF

Previous QuestionNext Question
What directory is used by the compiler for compiling a Fortran Program? Where does f77 live?Where can I get a Fortran Compiler for IBM PC?