Silverfrost Forums

Welcome to our forums

writefa@ (64 bit) inverts CR/LF

16 Dec 2019 2:18 #24781

Hello,

subroutine writefa@ seems to invert CR/LF for the 64 bit version.

The code following uses writefa@ to write '234' to a file and then reads the file using readf@ in order to check the contents of the file generated.

      character*256 mydata
      character *1 c1
      character*64 myfile
      integer*2 handle,myerror
      integer*4 nbytes_read    
      myfile='input_file1.txt'
      call openw@(myfile,handle,myerror)
      mydata='234'
      call writefa@(mydata(1:leng(mydata)),handle,myerror)
      call closef@(handle,myerror)
      call openr@(myfile,handle,myerror)
      call readf@(mydata,handle,3,nbytes_read,myerror)
      write(*,*) mydata(1:leng(mydata))
      call readf@(c1,handle,1,nbytes_read,myerror)
      write(*,*) ICHAR(c1)
      call readf@(c1,handle,1,nbytes_read,myerror)
      write(*,*) ICHAR(c1)
      call closef@(handle,myerror)
      end

Using this code executables are generated with ftn95, version 8.51.0, for both the 32 bit and the 64 bit version.

Output for the 32 bit version:

 234
           13
           10

Output for the 64 bit version:

 234
           10
           13

The documantation says that a CR/LF is added to the end of the data written via readfa@.

Regards, Dietmar

16 Dec 2019 2:35 #24782

Dietmar

Thank you for the feedback. I have made a note of this.

16 Dec 2019 10:32 #24785

Respect to CR/LF Silverfrost has to synchronize with other compilers (essentially with the entire world of all existing software for Windows) how it writes and reads unformatted data. This will not negatively affect anyone while we will be able to read unformatted data usual way, not with just the readf@. Writing about this because we already discussed that many times but no words at that time was heard if this will be in the works or not

18 Dec 2019 1:32 #24786

Dietmar

This has now been fixed for the next release of clearwin64.dll.

20 Dec 2019 6:06 #24798

Sore subject. It should have been earlier this month but an issue reared its head...

Please login to reply.