On 11/5/2022 4:52 PM, John wrote:
> I just remembered an old argument about how some compilers allowed redundant parenthesis around expressions and how allowing anything but constants would break that, but just tried three compilers and none of them did so maybe that is a moot point. Does anyone know of a compiler that still allows something like "print *, (3+10*3)" printing a scalar integer, for example?
D:\Projects>type t.f90
print *, (3+10*3)
end
D:\Projects>ifort t.f90
Intel(R) Fortran Intel(R) 64 Compiler Classic for applications running
on Intel(R) 64, Version 2021.7.0 Build 20220726_000000
Copyright (C) 1985-2022 Intel Corporation. All rights reserved.
Microsoft (R) Incremental Linker Version 14.33.31630.0
Copyright (C) Microsoft Corporation. All rights reserved.
-out:t.exe
-subsystem:console
t.obj
D:\Projects>t.exe
33
D:\Projects>
I recognize the similarity to CMPLX, but am not sure the standard wants
to make complex constants elemental. I'm intending to write a paper and
see what the sense of the committee is on this. For F2023, which is in
the DIS stage, it would be simple to require the real and imaginary
parts to be scalar. Trying to do more at this point would risk
complications that often happen with last-minute expansions of semantics
- and it could be considered for F202Y.