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 

Real numbers as DO indices in Fortran 95

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



Joined: 01 Mar 2008
Posts: 3
Location: Norway

PostPosted: Tue Mar 04, 2008 11:20 am    Post subject: Real numbers as DO indices in Fortran 95 Reply with quote

Real numbers as DO indices are from Fortran 95 on not any more a part of the standard. Using the ISO option when compiling (Plato) is supposed to ensure that the code is in agreement with the standard. However the compiler (version 5.10 and earlier) does not block real numbers as DO indices. This is demonstrated in the following example code:

OPTIONS( ISO ) ! To ensure that the code is in agreement with the Fortran 95 standard
PROGRAM trigonometrisktabell_ISO
IMPLICIT NONE
REAL, PARAMETER :: PI = 3.1415927
REAL :: radianer, grader, faktor

WRITE( *, * ) ' Vinkel Sinus Cosinus'
faktor = 2.0 * PI / 360.0
DO grader = 0.0, 90.0, 0.1 ! Should produce a compilation error message
radianer = grader * faktor
WRITE( *, * ) grader, SIN( radianer ), COS( radianer )
END DO

END PROGRAM trigonometrisktabell_ISO
Back to top
View user's profile Send private message
IanLambley



Joined: 17 Dec 2006
Posts: 490
Location: Sunderland

PostPosted: Wed Mar 05, 2008 1:33 pm    Post subject: Reply with quote

Hei,

Sjekker er at det/non_standard bryter er skrudd av, da en å varsle utgitt.

Ha det bra

Ian

PS Jeg snakke ikke Norsk (but I try every now and then).
Back to top
View user's profile Send private message Send e-mail
PaulLaidler
Site Admin


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

PostPosted: Wed Mar 05, 2008 5:27 pm    Post subject: Reply with quote

I have fixed this bug but the fix is too late for the impending release.
Back to top
View user's profile Send private message AIM Address
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