# Overwriting current line with position edit descriptor "T"

**URL:** <https://fortran-lang.discourse.group/t/overwriting-current-line-with-position-edit-descriptor-t/9951>\
**Category:** Help\
**Created:** [July 25, 2025, 4:25pm UTC](https://fortran-lang.discourse.group/t/overwriting-current-line-with-position-edit-descriptor-t/9951 "2025-07-25T16:25:59Z")\
**Posts on this page:** 1\
**Showing post:** 15

<div class="post-metadata">

**Author:** ![sblionel](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/sblionel/32/853_2.png) [@sblionel](https://fortran-lang.discourse.group/u/sblionel)\
**Post date:** [July 26, 2025, 11:50pm UTC](https://fortran-lang.discourse.group/t/overwriting-current-line-with-position-edit-descriptor-t/9951/15 "2025-07-26T23:50:48Z")

</div>

The standard talks about records but is silent on how the underlying implementation separates records. OpenVMS, for example, supports many on-disk formats, the oldest of which use metadata not visible to the user to indicate the length of each record. You cannot assume any particular character sequence visible to the user.

The standard is very clear on the return value of the `NEW_LINE` intrinsic - it is `ACHAR(10)` or `CHAR(10,KIND(A))` if that is representable. Only for `STREAM` output does this have a meaning. If you are on a platform such as Windows where `LF` is not the record separator for stream output, the implementation must convert that single `LF` to whatever the appropriate sequence is.

For example, I ran the following program using ifx on Windows:

```auto
    open (unit=1,file='test.txt',form='formatted',access='stream')
    write (1,'(*(A))') 'ABC',NEW_LINE('a'),'DEF'
    end

```

If I look at the file using a binary editor, I see:

`41 42 43 0D 0A 44 45 46 0D 0A`

in other words, that single `LF` got turned into `CR LF` by the ifx runtime library.

What this means is that you can write stream files in a platform-independent fashion and depend on the implementation to do whatever is required to create the indicated records.

---

_[View the full topic](https://fortran-lang.discourse.group/t/overwriting-current-line-with-position-edit-descriptor-t/9951)._
