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 

Extraneous space in auto-width real format

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
acw



Joined: 04 Nov 2005
Posts: 164
Location: Darkest Devon

PostPosted: Thu Oct 24, 2019 1:28 pm    Post subject: Extraneous space in auto-width real format Reply with quote

When using auto-width format descriptor for real numbers a leading space is incorrectly added. This does not happen with auto-width integer format.

Code:

  real*8:: fvalue = 42.5
  integer:: ivalue = 23

  print 100, fvalue     ! expected "f0.2=42.50", actual "f0.2= 42.50"
  100 format('f0.2=',F0.2)

  print 200, ivalue     ! expected and actual "I0=23"
  200 format('I0=',I0)


This is in FTN95 8.50, used to work in 7.10 but I haven't tried any intermediate releases.
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


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

PostPosted: Mon Oct 28, 2019 11:22 am    Post subject: Reply with quote

I have made a note that this needs investigation.
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Thu Oct 31, 2019 5:23 pm    Post subject: Reply with quote

This regression has now been fixed for the next release of the DLLs.
Back to top
View user's profile Send private message
DanRRight



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

PostPosted: Fri Nov 01, 2019 12:55 pm    Post subject: Reply with quote

Never heard about 0 format.

Couple questions about format

1) What is format like this '(es13.6)' I found on the web?

2) How to read this format with commas xxx,xxx,xxx from Windows DIR

Total Files Listed:
16 File(s) 719,806,745 bytes
2 Dir(s) 206,787,850,240 bytes free
Back to top
View user's profile Send private message
John-Silver



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

PostPosted: Sat Nov 02, 2019 12:57 am    Post subject: Reply with quote

Paul wrižote:
Quote:
... fixed for the next release of the DLLs.


... due when ?
_________________
''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
JohnCampbell



Joined: 16 Feb 2006
Posts: 2138
Location: Sydney

PostPosted: Sat Nov 02, 2019 1:51 pm    Post subject: Re: Reply with quote

Dan,

16 File(s) 719,806,745 bytes
2 Dir(s) 206,787,850,240 bytes free

To read the above in Fortran could be difficult:
FTN95 treats 719,806,745 as 3 values separated by a ","

So to read this you would need to read as characters and parse the numeric value. While EN does modify scientific notation and output as multiple of 1,000 and so groups of 3 digits, it does not insert ","

In FTN95, the business format is used to include commas, but I don't think you can use the business format as an input format.

As to "Never heard about 0 format", I0 and F0.n have been around since F90, while engineering (EN) and scientific (ES) notation were introduced in F95. G0. and E0. have been introduced since, although more complex.

My understanding is that support for comma "," is unique to FTN95 and has not been adopted in more recent Fortran.
Back to top
View user's profile Send private message
DanRRight



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

PostPosted: Sun Nov 03, 2019 11:33 am    Post subject: Reply with quote

Thanks, John
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support 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