escape character

Daniel Franke franke.daniel@gmail.com
Fri Dec 19 13:31:00 GMT 2008


On Friday 19 December 2008 13:22:34 Lucian Botha wrote:
> I get the following error when I take out the \
> So it's still not working
>
> SEE-SAAO.FOR:111.38:
>
>      1              K1,time(k),IH(K),':',IM(K),':',IS(K),I1(K),I2(K),
>                                      1
> Error: Syntax error in WRITE statement at (1)


It might not the ':', even if indicated. 
Try something small and work up from there:

$> cat write.f90
  write(*, FMT="(I2.2, A1, I2.2, A1, I2.2)") 12, ':', 34, ':', 56
end

$> gfortran write.f90 && ./a.out
12:34:56

Then add your output fields one by one and see if/when/why it breaks.

Regards

	Daniel



More information about the Fortran mailing list