This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Non conforming code or gfortran bug ?


Quoting Benjamin Réveillé <benjamin.reveille@gmail.com>:

> Hello all
>
>  Here is a sample program that illustrates the fact that gfortran
> can't escape ' and "
>
>  program escaping
>     implicit none
>     write(*,*) 'Hello \'World\''
>     write(*,*) "Hello 'World'"
>     write(*,*) "Hello \"World\""
>     write(*,*) 'Hello "World"'
>  end program escaping

You might want to use the portable, standard-conforming syntaxes:
 'Hello ''World''', "Hello 'World'" (give Hello 'World')
 "Hello ""World""", 'Hello "World"' (give Hello "World")

- Tobi


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]