Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29285 Discussions

KIND statement causing compiler errors

shuttledude
Beginner
597 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
597 Views
How about renaming your PROGRAM unit name to something else? ;;)
Jugoslav
0 Kudos
Steven_L_Intel1
Employee
597 Views
Right - you have hidden the name of the intrinsic KIND function by naming your program KIND.
0 Kudos
shuttledude
Beginner
597 Views
0 Kudos
Reply