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
The issue here is that parsing statement functions is being confused by substring assignments. We need to fix the code that detects whether a line is a statement function via the following rules:
where <f-ident> may not be predefined as an array and the left hand expression may not contain substrings. Statement expressions must follow initialisation but precede the first executable statement.
There are other issues with statement expression parsing that need to be resolved here so I'm changing the issue title since once these are fixed, substring assignment will start working without any other changes (com already supports them in the assignment parse node implementation).
Ensure statement functions precede any executable code.
Ensure statement functions are not recursive.
Arguments may not be functions or arrays.
Statement functions cannot be EXTERNAL.
See here for more details. We also need better unit tests to validate all the above.
stevewpalmer
changed the title
Support Fortran substring assignment
Fix parsing of statement functions
Jan 5, 2025
stevewpalmer
changed the title
Fix parsing of statement functions
Fortran: Fix parsing of statement functions
Jan 5, 2025
We need to add support for the ability to assign input and calculations to character substrings.
The text was updated successfully, but these errors were encountered: