- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
I have a small number which I writing to a file with:
FORMAT (A14,1P,D22.12)
The number gets written as:
5.148200387154-130
ie. without the "D"
When I try to read it, it fails. Why is the "D" not being written? I guess it has something to do with the exponent being bigger than 99.
FORMAT (A14,1P,D22.12)
The number gets written as:
5.148200387154-130
ie. without the "D"
When I try to read it, it fails. Why is the "D" not being written? I guess it has something to do with the exponent being bigger than 99.
- Marcas:
- Intel® Fortran Compiler
Link copiado
3 Respostas
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Actually if I read with D22.12 it reads OK, my read format statement was old. But it is rather strange.
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
The standard requires this behavior. You can get around it by using E22.12E3 for the format. Yes, you must give up on D for the exponent letter. Fortran will read that string, but other languages may not.
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
>>Yes, you must give up on D for the exponent letter. Fortran will read that string, but other languages may not.
Like Excel
Like Excel

Responder
Opções do tópico
- Subscrever fonte RSS
- Marcar tópico como novo
- Marcar tópico como lido
- Flutuar este Tópico para o utilizador atual
- Marcador
- Subscrever
- Página amigável para impressora