In: Computer Science
by using Fortran.90 solve the Question below?
Q1)Correct the names of the following variable
according to the fortran.90 stander.
1)Max'power, 2) 2*level, 3) low temp, 4)
High(speed)
Q2)Which of the following are invalid names in Fortran
90 and why?
1)A_HUGE_NUMBER
2)thedate
3)abignumber
4)Program
5)10times
6)Time.minutes
7)HELP!
1066(8
9)another-number
10)no way
11)f[t]
12)X
Q1)
1) Maxpower -The ' character
is not allowed
2) level2 -The
name cannot start with digit and cannot contain *
3) lowtemp -The name
cannot contain blanks
4) Highspeed -The name cannot
contain ( or )
Q2)
5) is invalid because the name is starting with
a digit
6) is invalid because the character . is
present
7) is invalid because the ! is present
8) is invalid because it is a number
9) is invalid because the character - is
present
10) is invalid because it contains blanks
11) is invalid because characters [ and ] are
present
The rules for variable names in fortran 90
are:
- A variable name must start with
an letter.
- After that, the rest of the name
can contain only letters (a--z), digits (0--9) or underscore
character _ (no blanks!).
- A variable name can be no longer
than 31 characters.
Hope this was useful