[flang-commits] [PATCH] D153916: [flang][NFC] Add F2023X documentation

Brad Richardson via Phabricator via flang-commits flang-commits at lists.llvm.org
Tue Jun 27 16:59:59 PDT 2023


everythingfunctional added inline comments.


================
Comment at: flang/docs/F202X.md:90-95
+```
+  character(:), allocatable :: buffer
+  allocate(character(20)::buffer)
+  write(buffer,'F5.3') 3.14159
+  print *, len(buffer)
+```
----------------
I'd be curious to know if you have any examples of real world code that rely on the length of a buffer not changing, or would have meaningful different observable behaviour. In my experience the typical usage would be more like:

```
  character(:), allocatable :: buffer
  allocate(character(20)::buffer)
  write(buffer,'F5.3') 3.14159
  print *, trim(buffer)
```

which wouldn't show observably different behavior. Or at worst:

```
  character(:), allocatable :: buffer
  allocate(character(20)::buffer)
  write(buffer,'F5.3') 3.14159
  print *, buffer
```

where it is observably different (no more trailing blanks), but is likely to be a welcome change, not an unwelcome one.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D153916/new/

https://reviews.llvm.org/D153916



More information about the flang-commits mailing list