Skip to content

Conversation

@tueda
Copy link
Collaborator

@tueda tueda commented Oct 26, 2018

From a forgotten Issue #188. We don't need to follow the FORTRAN style for symbol/$-variable declaration:

CF f;
L F = f(3);
S n;
id f(n?) = n;
P;
.end

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.01%) to 48.242% when pulling a175d69 on tueda:loosedecl into 07cce53 on vermaseren:master.

@benruijl
Copy link
Collaborator

benruijl commented Jul 7, 2022

In issue #188 you mention wanting to put ModuleOption noparallel anywhere, but noparallel is not in the allowed list of this commit. Is there a problem with that option?

@tueda
Copy link
Collaborator Author

tueda commented Jul 7, 2022

Maybe I just forgot to add noparallel, or maybe some problem; I don't remember exactly. For consistency, other module options could be added, too.

On the other hand, if in one module both local and noparallel are specified, then it indicates some conflicts between a part that should be parallelized and a part that should be executed in the non-parallel mode. Errors/warnings could be useful in such cases.

@benruijl
Copy link
Collaborator

benruijl commented Jul 7, 2022

Can we simply allow all ModuleOptions to be specified anywhere in the module?

@tueda
Copy link
Collaborator Author

tueda commented Jul 11, 2022

Maybe it would not be a problem if we give warnings/errors for inconsistent use of ModuleOptions, for example using both local and noparallel or polyratfun twice with different functions/options. The latter is dangerous because it occurs when two subroutines (procedures called in a module) assume different polyratfuns and probably leads to a wrong result.

@jodavies
Copy link
Collaborator

What is actually inconsistent about using both local and noparallel? This should be in the end equivalent to running the code with form or tform -w1 should it not?

@tueda
Copy link
Collaborator Author

tueda commented Jul 11, 2022

Yes, you are right. But this potentially indicates a performance issue (parallel part and no-parallel part in a module mistakenly), which is easily found if one has to write ModuleOptions only at the end of a module while may be difficult to recognize when ModuleOptions are distributed over a big module, especially inside procedures.

@jodavies
Copy link
Collaborator

jodavies commented Nov 7, 2024

I think it would be interesting to resurrect this for v5?

@tueda
Copy link
Collaborator Author

tueda commented Jun 20, 2025

Actually, which ordering relaxations should we include in version 5? Do we have consensus?

@jodavies
Copy link
Collaborator

Certainly the dollar-related moduleoptions were a request at the workshop. What does your code comment mean by "mixed statements"?

@vermaseren
Copy link
Collaborator

vermaseren commented Jun 20, 2025 via email

@tueda
Copy link
Collaborator Author

tueda commented Jun 20, 2025

@jodavies, by "mixed statements", I meant statements with the MIXED flag. One problem is that we now also have the MIXED2 flag.

@vermaseren, you mean all declarations and all moduleoptions are free to be relocated?? Or are exceptions only between declarations and moduleoptions? (But it is not so useful...)

@jodavies
Copy link
Collaborator

OK, so this means only print and printtable? The MIXED2 flag does not appear to have any associated statements?

@tueda
Copy link
Collaborator Author

tueda commented Jun 20, 2025

Yes. So the question is the purpose of MIXED2. Maybe it was created for these declarations and module options?

@jodavies jodavies added this to the v5 milestone Sep 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants