You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PROGRAM demo
INTEGER TAB(10)
DO10 I=1,10
TAB(I) = I*I
10CONTINUEPRINT*, TAB
END
In Situation1, the parser fortran-src-extras see TAB(I) as a statement functionwhich is wrong
In Situation2, the parser fortran-src-extras see TAB(I) as an arraywhich is correct
The reason is that in the first case the declaration of the tab variable is in the #include ..., so the parser has no information that it is an array, whereas in the second case it has the information (declaration of the tab variable) that it is an array.
Idea for a solution: Create an intermediate entity (IAST) corresponding to a statement function and postpone the resolution when the symbols are resolved.
The text was updated successfully, but these errors were encountered:
Situation1
Situation2
fortran-src-extras
seeTAB(I)
as a statement function which is wrongfortran-src-extras
seeTAB(I)
as an array which is correctThe reason is that in the first case the declaration of the
tab
variable is in the#include ...
, so the parser has no information that it is an array, whereas in the second case it has the information (declaration of thetab
variable) that it is an array.Idea for a solution: Create an intermediate entity (IAST) corresponding to a statement function and postpone the resolution when the symbols are resolved.
The text was updated successfully, but these errors were encountered: