 |
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
DanRRight
Joined: 10 Mar 2008 Posts: 2924 Location: South Pole, Antarctica
|
Posted: Fri Jun 22, 2012 11:41 pm Post subject: What is the limit on amount of continuations |
|
|
in current Fortran standard and FTN95? Is it still 19? |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8211 Location: Salford, UK
|
Posted: Sat Jun 23, 2012 8:25 am Post subject: |
|
|
I have had a quick look at the Fortran 95 Standard and cannot see any mention of a limit. |
|
Back to top |
|
 |
davidb
Joined: 17 Jul 2009 Posts: 560 Location: UK
|
Posted: Sat Jun 23, 2012 10:03 am Post subject: |
|
|
For FORTRAN 77
maximum is 19
For Fortran 90 and Fortran 95
maximum in fixed-form source files is 19 (same as FORTRAN 77)
maximum in free-form source files is 39
For Fortran 2003 and Fortran 2008
maximum in fixed-form and free-form files is 255 _________________ Programmer in: Fortran 77/95/2003/2008, C, C++ (& OpenMP), java, Python, Perl |
|
Back to top |
|
 |
JohnCampbell
Joined: 16 Feb 2006 Posts: 2615 Location: Sydney
|
Posted: Mon Jun 25, 2012 1:01 am Post subject: |
|
|
Based on this example, the limit is 99 for FTN95 free format.
This appears arbitrary, but can have an effect in extended data statements or long COMMON definitions when using in-line comments (Modules do not have this problem).
Code: | integer i
character*5 aaa(101)
data aaa / &
' 1 ', &
' 2 ', &
' 3 ', &
' 4 ', &
' 5 ', &
' 6 ', &
' 7 ', &
' 8 ', &
' 9 ', &
' 10 ', &
' 11 ', &
' 12 ', &
' 13 ', &
' 14 ', &
' 15 ', &
' 16 ', &
' 17 ', &
' 18 ', &
' 19 ', &
' 20 ', &
' 21 ', &
' 22 ', &
' 23 ', &
' 24 ', &
' 25 ', &
' 26 ', &
' 27 ', &
' 28 ', &
' 29 ', &
' 30 ', &
' 31 ', &
' 32 ', &
' 33 ', &
' 34 ', &
' 35 ', &
' 36 ', &
' 37 ', &
' 38 ', &
' 39 ', &
' 40 ', &
' 41 ', &
' 42 ', &
' 43 ', &
' 44 ', &
' 45 ', &
' 46 ', &
' 47 ', &
' 48 ', &
' 49 ', &
' 50 ', &
' 51 ', &
' 52 ', &
' 53 ', &
' 54 ', &
' 55 ', &
' 56 ', &
' 57 ', &
' 58 ', &
' 59 ', &
' 60 ', &
' 61 ', &
' 62 ', &
' 63 ', &
' 64 ', &
' 65 ', &
' 66 ', &
' 67 ', &
' 68 ', &
' 69 ', &
' 70 ', &
' 71 ', &
' 72 ', &
' 73 ', &
' 74 ', &
' 75 ', &
' 76 ', &
' 77 ', &
' 78 ', &
' 79 ', &
' 80 ', &
' 81 ', &
' 82 ', &
' 83 ', &
' 84 ', &
' 85 ', &
' 86 ', &
' 87 ', &
' 88 ', &
' 89 ', &
' 90 ', &
' 91 ', &
' 92 ', &
' 93 ', &
' 94 ', &
' 95 ', &
' 96 ', &
' 97 ', &
' 98 ', &
' 99 ', &
' 100 ', &
' 101 ' /
!
do i = 1,size(aaa)
write (*,*) i,aaa(i)
end do
end
|
|
|
Back to top |
|
 |
DanRRight
Joined: 10 Mar 2008 Posts: 2924 Location: South Pole, Antarctica
|
Posted: Mon Jun 25, 2012 9:32 am Post subject: |
|
|
Thanks for the info. I find FTN95 often exceeds the Standard Fortran95 limits |
|
Back to top |
|
 |
davidb
Joined: 17 Jul 2009 Posts: 560 Location: UK
|
Posted: Mon Jun 25, 2012 10:50 pm Post subject: |
|
|
Johns example gives an error that the number of continuations is more than 99. However if you use the /ISO flag, the compiler gives the error that the number of lines is more than 39. _________________ Programmer in: Fortran 77/95/2003/2008, C, C++ (& OpenMP), java, Python, Perl |
|
Back to top |
|
 |
|
|
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
|