Software Archive
Read-only legacy content
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.
17060 Discussions

Reserved Words

Intel_C_Intel
Employee
785 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
785 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