- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
Zero sized array constructors for derived types used to work, didn't they? They syntax for them appears to be in the compiler docs.
[fortran]PROGRAM WhereDidZeroSizedArrayConstructorsGo
IMPLICIT NONE
TYPE :: my_type
END TYPE my_type
TYPE(my_type), ALLOCATABLE :: array(:)
array = [ my_type :: ]
PRINT *, SIZE(array)
END PROGRAM WhereDidZeroSizedArrayConstructorsGo
[/fortran]
[plain]>ifort /check:all /warn:all /standard-semantics ArrayConstructors.f90
Intel(R) Visual Fortran Compiler XE for applications running on IA-32, Version 13.0.1.119 Build 20121008
Copyright (C) 1985-2012 Intel Corporation. All rights reserved.
ArrayConstructors.f90(8): error #5082: Syntax error, found '::' when expecting one of: , (/ : ]
array = [ my_type :: ]
--------------------^
ArrayConstructors.f90(8): error #6478: A type-name must not be used as a variable. [MY_TYPE]
array = [ my_type :: ]
------------^
compilation aborted for ArrayConstructors.f90 (code 1)[/plain]
Or am I imagining things? I would have sworn that they were in active use in our code base, but now I can't find any examples.
Yours in deluded confusion,
IanH
- Etiquetas:
- Intel® Fortran Compiler
Enlace copiado
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
- 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