- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
I'm writing floating point data to a text file with a (G) format and for a number like 0.12345 the presence of a leading zero depends on whether I'm running the program from a DOS command line or running it from inside the visual studio debugger. Is this supposed to happen?
- Etiquetas:
- Intel® Fortran Compiler
Enlace copiado
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
No, and I think you're not properly explaining what you are seeing. Small but complete code example, please, with sample output in both cases.
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
Depending on the attributes used to OPEN the file and compiler options such as /vms, ASA carriage control may be in play. That would explain why a leading '0' character would cause the program to output a blank line followed by the rest of the record.
Is xi2 computable from xi?
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
Please show a complete program and also show the compile options used. I would also discourage you from using "G" with no width as that is non-standard. You could use G0, maybe with a 1X after the G0. Are you running the same executable in both environments or recompiling? Show options in both cases.
Fortran carriage control is not on by default, but Intel Fortran generally doesn't add a leading zero when F format is in effect. Maybe you're running an executable built by some other compiler?
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
It's possible the post got held for moderation - we're working to improve that. Use "Send Author A Message" to send it to me if you want,
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
I'm still looking for a test case I can build and run myself. There should not be a difference.

- Suscribirse a un feed RSS
- Marcar tema como nuevo
- Marcar tema como leído
- Flotar este Tema para el usuario actual
- Favorito
- Suscribir
- Página de impresión sencilla