forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

writefa@ (64 bit) inverts CR/LF

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> 64-bit
View previous topic :: View next topic  
Author Message
DietmarSiepmann



Joined: 03 Jun 2013
Posts: 239

PostPosted: Mon Dec 16, 2019 3:18 pm    Post subject: writefa@ (64 bit) inverts CR/LF Reply with quote

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:
Code:

 234
           13
           10


Output for the 64 bit version:
Code:

 234
           10
           13

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

Regards,
Dietmar
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 6464
Location: Salford, UK

PostPosted: Mon Dec 16, 2019 3:35 pm    Post subject: Reply with quote

Dietmar

Thank you for the feedback. I have made a note of this.
Back to top
View user's profile Send private message AIM Address
DanRRight



Joined: 10 Mar 2008
Posts: 2206
Location: South Pole, Antarctica

PostPosted: Mon Dec 16, 2019 11:32 pm    Post subject: Reply with quote

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
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 6464
Location: Salford, UK

PostPosted: Wed Dec 18, 2019 2:32 pm    Post subject: Reply with quote

Dietmar

This has now been fixed for the next release of clearwin64.dll.
Back to top
View user's profile Send private message AIM Address
John-Silver



Joined: 30 Jul 2013
Posts: 1397
Location: Aerospace Valley

PostPosted: Thu Dec 19, 2019 2:50 am    Post subject: Reply with quote

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 ... Smile "
Back to top
View user's profile Send private message
Robert



Joined: 29 Nov 2006
Posts: 329
Location: Manchester

PostPosted: Fri Dec 20, 2019 7:06 pm    Post subject: Reply with quote

Sore subject. It should have been earlier this month but an issue reared its head...
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> 64-bit All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
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