Software Archive
Read-only legacy content

Reserved Words

Intel_C_Intel
Employee
538 Views
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?
0 Kudos
1 Reply
Steven_L_Intel1
Employee
538 Views
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
0 Kudos
Reply