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 

Format bug
Goto page Previous  1, 2
 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
DanRRight



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

PostPosted: Mon Oct 12, 2015 11:01 am    Post subject: Reply with quote

I'd look also how IVF treats that.
Back to top
View user's profile Send private message
JohnCampbell



Joined: 16 Feb 2006
Posts: 2554
Location: Sydney

PostPosted: Mon Oct 12, 2015 11:42 am    Post subject: Reply with quote

Intel Fortran has IOSTAT=63 condition, which relates to this problem, although I have never seen it occur.
I am not sure how it would work, or how to select between "error or info"
The following is an extract taken from Intel's List of Run-Time Error Messages.
https://software.intel.com/en-us/node/525375
Quote:
63 error or info(63): Output conversion error

FOR$IOS_OUTCONERR. During a formatted output operation, the value of a particular number could not be output in the specified field length without loss of significant digits. When this situation is encountered, the overflowed field is filled with asterisks to indicate the error in the output record. If no ERR address has been defined for this error, the program continues after the error message is displayed. To suppress this error message, see the description of check[:]nooutput_conversion.

Note: The severity depends on the check[:]keywords option used during the compilation command. The ERR transfer is taken after completion of the I/O statement for error numbers 61, 63, 64, and 68. The resulting file status and record position are the same as if no error had occurred. However, other I/O errors take the ERR transfer as soon as the error is detected, so file status and record position are undefined.
Back to top
View user's profile Send private message
DanRRight



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

PostPosted: Mon Oct 12, 2015 9:56 pm    Post subject: Reply with quote

Anyone has IVF to run the code on message 1? The Silverfrost developers simply MUST have it.

But let's return to this issue after /64 will be ready, it is of 1/10000000 the importance
Back to top
View user's profile Send private message
simon



Joined: 05 Jul 2006
Posts: 268

PostPosted: Tue Oct 13, 2015 3:16 pm    Post subject: Reply with quote

I think John's suggestion of setting an IOSTAT condition for this problem would be favourite. To me it seems important that the compiler should behave in a consistent manner as follows:

1. If ERR and IOSTAT are absent, the program terminates if there is an IO error

2. If ERR is present the program jumps to the line label regardless of the error

3. If IOSTAT is present the program continues regardless and the programmer decides what if anything to do.

So if we define
Code:
WRITE (*,'(I1)') 10
as an error then the program should stop in case 1 above. I think that this is undesirable. If it is agreed that it is undesirable to stop in case 1, then case 2 should not apply either (which is as things stand and the reason for the original post). Instead setting a non-zero IOSTAT value seems the only logical option. The non-zero value could then be interpreted not as an actual error, but as a form of information that output has not proceeded in a simple manner. FTN95 currently returns IOSTAT=0.
Back to top
View user's profile Send private message
mecej4



Joined: 31 Oct 2006
Posts: 1886

PostPosted: Tue Oct 13, 2015 4:31 pm    Post subject: Reply with quote

Simon,

It is good to see someone think through the ramifications of a suggested change to the compiler. In the present instance, Paul has made it clear that the extension, which is not in conformity with the standard, will apply only when it is chosen through a deliberate subroutine call. As long as most users are shielded from such non-standard behavior, one cannot complain about its being provided, apart from observing that I as a user would rather see Silverfrost direct its development efforts to issues that relate to unimplemented features of the standard (such as those in TR-15581), 64 bit code, etc.

I see this problem with your description in Item 2.: If ERR is present the program jumps to the line label regardless of the error. The very abbreviation ERR implies association with an error, and the standard itself says the following in 9.11.5 regarding IOSTAT:

1 Execution of an input/output statement containing the IOSTAT= specifier causes the scalar-int-variable in the IOSTAT= specifier to become defined with a zero value if neither an error condition, an end-of-file condition, nor an end-of-record condition occurs,...

Thus, we are faced with a number of inconsistencies when the proposed non-standard extension is active:

    1. An error is not an error if you don't check for it.
    2. You cannot compare IOSTAT to zero to decide whether an error occurred.
    3. ... many other inconsistencies that will be revealed only after extensive investigation and/or experience.
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
Goto page Previous  1, 2
Page 2 of 2

 
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