- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
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
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]
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How about renaming your PROGRAM unit name to something else? ;;)
Jugoslav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Right - you have hidden the name of the intrinsic KIND function by naming your program KIND.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page