I don't think the equation you have would be permitted, as the array bounds must be INTEGER constants. However, constants declared with the PARAMETER statement are OK for array declarations, as long as the PARAMETER statement precedes the array declaration.
The whole point of a parameter in Fortran is that the parameter's value is known at compile time, so the compiler knows how much memory to allocate for the array. For a variable (not a parameter), the variable gets its value at run time, I believe.
Minor point. A statement such as y = 2 is an assignment, or in this case an initialization, not an equation. It does not state that y and 2 are equal. Instead, it stores the constant value 2 in the location that is named y.
Most programming languages make distinctions between assignment and testing for equality by using different symbols. For example, Fortran uses .EQ. to test for equality, and uses = for assignment. Languages based on C, such as C++, C#, Java, and others, use == to test for equality and = for assignment. Newer versions of Fortran now support the C-style notation, in addition to the older .EQ., .LT., GT., and other spelled-out relational operators.
We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling We Value Civility
• Positive and compassionate attitudes
• Patience while debating We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving