Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29382 Discussions

KIND statement causing compiler errors

shuttledude
Beginner
721 Views
The following console app program will not compile in Compaq Visual Fortran 6.0 . What could I possibly be doing wrong?!
program kind
implicit none
integer single, double
single = KIND(1.0E00)
double = KIND(1.0D00)
WRITE(*, 10) single
10 FORMAT(1x, 'single is ', I2)
WRITE(*, 20) double
20 FORMAT(1x, 'double is ', I2)
end program kind
For each of the statements that have KIND in them, I get this error statement:
Error: This global name is invalid in this context. [KIND]
0 Kudos
3 Replies
Jugoslav_Dujic
Valued Contributor II
721 Views
How about renaming your PROGRAM unit name to something else? ;;)
Jugoslav
0 Kudos
Steven_L_Intel1
Employee
721 Views
Right - you have hidden the name of the intrinsic KIND function by naming your program KIND.
0 Kudos
shuttledude
Beginner
721 Views
0 Kudos
Reply