fprettify icon indicating copy to clipboard operation
fprettify copied to clipboard

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

Open e-kwsm opened this issue 3 years ago • 0 comments
trafficstars

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

e-kwsm avatar Jun 23 '22 22:06 e-kwsm