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.)
- 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,
Go back to Notes
Next: Solution
Up: Introduction to Fortran 90
Previous: Solution
©University of Liverpool, 1997
Thu May 29 10:11:26 BST 1997Not for commercial use.