Next: Solution
Up: Introduction to Fortran 90
Previous: Solution
Which of the following are incorrect declarations and why? (If you think
a declaration may be correct in a given situation then say what the
situation would be.)
- INTERGER :: i
- ReAl x
- CHARACTER name
- CHARACTER(LEN=10) name
- REAL var-1
- INTEGER 1a
- BOOLEAN :: loji
- DOUBLE :: X
- CHARACTER(LEN=5) :: town = "Glasgow"
- CHARACTER(LEN=*) :: town = "Glasgow"
- CHARACTER(LEN=*), PARAMETER :: city = "Glasgow"
- REAL :: pi = +22/7
- LOGICAL :: wibble = .TRUE.
- CHARACTER(LEN=*), PARAMETER :: "Bognor"
- REAL, PARAMETER :: pye = 22.0/7.0
- REAL :: two_pie = pye*2
- REAL :: a = 1., b = 2
- LOGICAL(LEN=12) frisnet
- CHARACTER(LEN=6) :: you_know = 'y'know"
- CHARACTER(LEN=6) :: you_know = "y'know"
- INTEGER ia ib ic id in free format source form
- DOUBLE PRECISION pattie = +1.0D0
- DOUBLE PRECISION :: pattie = -1.0E-0
- LOGICAL, DIMENSION(2) bool
- REAL :: poie = 4.*atan(1.)
- declare the following objects,
Next: Solution
Up: Introduction to Fortran 90
Previous: Solution
Adam Marshall ©University of Liverpool, 1996
Fri Dec 6 14:10:26 GMT 1996