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: 7928 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: 2819 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: 7928 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 |
|
|
John-Silver
Joined: 30 Jul 2013 Posts: 1520 Location: Aerospace Valley
|
Posted: Thu Dec 19, 2019 2:50 am Post subject: |
|
|
whnn is the next version release anticipated Paul ? _________________ ''Computers (HAL and MARVIN excepted) are incredibly rigid. They question nothing. Especially input data.Human beings are incredibly trusting of computers and don't check input data. Together cocking up even the simplest calculation ... " |
|
Back to top |
|
|
Robert
Joined: 29 Nov 2006 Posts: 445 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 |
|
|
|