- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I know it is bad programming practice to use FORTRAN reserved words as variables. However, I am porting older programs (FORTRAN 4 and 5) that use "TYPE" and "COUNT" as local variables. How does the compiler (V5.0A and V6.5A) handle this? Does declaring them as variables in the program override their use as a reserved word?
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Fortran has no reserved words. It's bad practice to use Fortran keywords as variable names because it can make programs difficult to read, but the compiler should be able to compile them ok. (I say should because I know that in the past we've had occasional parsing problems when variable names start with a letter sequence that is a keyword.)
COUNT, by the way, is not a Fortran keyword at all.
Steve
COUNT, by the way, is not a Fortran keyword at all.
Steve
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