 |
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
DietmarSiepmann
Joined: 03 Jun 2013 Posts: 279
|
Posted: Mon Dec 16, 2019 3:18 pm Post subject: writefa@ (64 bit) inverts CR/LF |
|
|
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.
Code: |
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:
Output for the 64 bit version:
The documantation says that a CR/LF is added to the end of the data written via readfa@.
Regards,
Dietmar |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8210 Location: Salford, UK
|
Posted: Mon Dec 16, 2019 3:35 pm Post subject: |
|
|
Dietmar
Thank you for the feedback. I have made a note of this. |
|
Back to top |
|
 |
DanRRight
Joined: 10 Mar 2008 Posts: 2923 Location: South Pole, Antarctica
|
Posted: Mon Dec 16, 2019 11:32 pm Post subject: |
|
|
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 |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8210 Location: Salford, UK
|
Posted: Wed Dec 18, 2019 2:32 pm Post subject: |
|
|
Dietmar
This has now been fixed for the next release of clearwin64.dll. |
|
Back to top |
|
 |
Robert

Joined: 29 Nov 2006 Posts: 457 Location: Manchester
|
Posted: Fri Dec 20, 2019 7:06 pm Post subject: |
|
|
Sore subject. It should have been earlier this month but an issue reared its head... |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|