Ah, this is copied example code from SUN/67. The document contains
Fortran 77 code. The colons (:) are in column 6 and indicate
continuation lines. They are not part of the Fortran 77 statement.
Try removing the two colons from your line of Fortran 95 code.
--
Horst Meyerdierks Royal Observatory Edinburgh
Linux/Network Manager [log in to unmask]
http://www.roe.ac.uk/~hme/ +44-131-6688-309
On Fri, Oct 15, 2010 at 12:49:33PM +0200, Hendrik Van Heerden wrote:
>
> Hi
>
> The following worked thank U
>
> f95 test.f90 -L/starlink/star-hawaiki/lib/ -lsla -o main.x
>
> Now I only have to fix code-bug
>
> [iraf@localdomain:localhost ~/fortran]$ f95 test.f90 -L/starlink/star-hawaiki/lib/ -lsla -o main.x
> test.f90:29.13:
>
> write (6,:'(1x,i2.2,2i3.2,''.'',i2.2,2x,a,i2.2,2i3.2,''.'',i1)'):ihmsf,s,id
> 1
> Error: Syntax error in WRITE statement at (1)
>
> Test code
> "
>
> program fk4fk5
>
> implicit none
>
> character C*80,S
> integer i,j,ihmsf(4),idmsf(4)
> double precision r4,d4,r5,d5
> logical bad
>
> C = ''
> do while (C(:1).NE.'.')
>
> read (5,'(A)') C
> if (C(:1).NE.'.') then
> bad = .TRUE.
>
> i = 1
> call sla_DAFIN(c,i,r4,j)
> if (j.eq.0) then
> r4 = 15D0*r4
>
> call sla_DAFIN(c,i,d4,j)
> if (j.eq.0) then
>
> call sla_FK45Z(r4,d4,1950D0,r5,d5)
>
> call sla_DR2TF(2,r5,s,ihmsf)
> call sla_DR2AF(1,d5,s,idmsf)
> write (6,:'(1x,i2.2,2i3.2,''.'',i2.2,2x,a,i2.2,2i3.2,''.'',i1)'):ihmsf,s,idmsf
> bad = .FALSE.
> end if
> end if
> if (bad) write (6,'(1x,"?")')
> end if
> end do
>
> end program
>
> "
>
> Cheers
> Pat
>
> _____________________________________________________________________
>
> University of the Free State: This message and its contents are subject to a disclaimer.
> Please refer to http://www.ufs.ac.za/disclaimer for full details.
>
> Universiteit van die Vrystaat:
> Hierdie boodskap en sy inhoud is aan 'n vrywaringsklousule onderhewig.
> Volledige besonderhede is by http://www.ufs.ac.za/vrywaring beskikbaar.
> _____________________________________________________________________
>
>
>
|