Fortran line continuation, where it can not be used?
- From: "Nasser M. Abbasi" <nma@xxxxxxxxx>
- Date: Sun, 12 Feb 2012 02:49:26 -0600
I thought I can use line continuation & any where I want to
break a statment?
But this program compiles ok with gfortran
-----------------------------------
program foo
integer, dimension(3,3) :: a
a = reshape( (/ 1, 2, 3, &
4, 5, 6, &
7, 8, 9/), &
(/ 3, 3 /))
end program foo
-------------------------------
but not this one:
------------------------
program foo
integer, dimension(3,3) :: b
b = reshape( (/ 1, 2, 3, &
4, 5, 6, &
7, 8, 9/ &
), &
(/ 3, 3 /))
end program foo
---------------------
$gfortran bug.f90
bug.f90:6.25:
7, 8, 9/ &
1
Error: Syntax error in array constructor at (1)
$gfortran -v
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-linux-gnu/4.6.1/lto-wrapper
Target: i686-linux-gnu
gcc version 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3)
$
What are the places where one can't use & to break
a Fortran statment?
thanks,
--Nasser
.
- Follow-Ups:
- Re: Fortran line continuation, where it can not be used?
- From: Tobias Burnus
- Re: Fortran line continuation, where it can not be used?
- Prev by Date: Re: Calling C++ from Intel Fortran...
- Next by Date: Re: Fortran line continuation, where it can not be used?
- Previous by thread: Secrets of dogs
- Next by thread: Re: Fortran line continuation, where it can not be used?
- Index(es):
Relevant Pages
|