- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Dear Fortran,
I have some derived types, types extended from a root (astract) type.
I define (scalar) variables using their constructors.
When the type is "simple" types (e.g. Point_2D : real :: x, y) it is Ok
But, when the type is more complicated (e.g. Circle : Point_2D and real :: radius)
the field radius is not intialized.
More strange (see output file) if the type is like ( Rectangle : Point_2D , real: h,w) the
h-field is initialized with the value of w-field and, therefore, w_fild not initialized
See details and program in attached files.
(Of course, if the fields are defined field by field it is Ok but more tedious to do)
- Marcas:
- Intel® Fortran Compiler
Link copiado
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
The source you attached has several errors and won't compile. Please fix these errors and attach again.
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
This line is not beautiful : Type(Point_3D) :: P3 = POINT_3D(12.0,13,100.0)
I prefer ; Type(Point_3D) :: P3 = POINT_3D(12.0,13.0,100.0)
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Thanks - I can reproduce the problem and have escalated it as issue DPD200241863. I will let you know of any progress.
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
This problem has been fixed for a release later this year.
- 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