Skip to content

fprettify misunderstands Unary operator (+ and -) in WRITE statement as Binary #125

Open
@e-kwsm

Description

@e-kwsm

Consider the following code:

PROGRAM UNARY
   IMPLICIT NONE
   INTEGER :: a, b
   a = -42
   b = -a
   WRITE (*, '(2I6)') -a, -b
END PROGRAM

Here all the occurrence of - is unary operator, but fprettify 0.3.7 adds a space as follows:

@@ -6 +6 @@
-   WRITE (*, '(2I6)') -a, -b
+   WRITE (*, '(2I6)') - a, -b

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugnon-critical bug (or with workaround)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions