Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Black Belt
19 Views

Type spec out the front of an array constructor

This Fortran 2003 feature is nice for direct use in structure constructors, actual arguments and the like.  But my simple mind ed testing of it fails :(

PROGRAM dont_you_forget_about_me
  IMPLICIT NONE
  TYPE :: t
    INTEGER :: alive_and_kicking
  END TYPE t
  
  TYPE(t), ALLOCATABLE :: array(:)
  
  array = [t ::]
  PRINT *, SIZE(array)
END PROGRAM dont_you_forget_about_me

 

>ifort /c "2016-08-13 arrayconstructors.f90"
Intel(R) Visual Fortran Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 17.0 Beta Build 20160517
Copyright (C) 1985-2016 Intel Corporation.  All rights reserved.

ifort: NOTE: The Beta evaluation period for this product ends on 7-oct-2016 UTC.
2016-08-13 arrayconstructors.f90(9): error #5082: Syntax error, found '::' when expecting one of: ] , (/ :
  array = [t ::]
-------------^
2016-08-13 arrayconstructors.f90(9): error #6478: A type-name must not be used as a variable.   
  array = [t ::]
-----------^
compilation aborted for 2016-08-13 arrayconstructors.f90 (code 1)

Previously discussed here.

0 Kudos
2 Replies
Highlighted
19 Views

This is already on our list. I'm out for the next week and a half, so can't check the status. Maybe one of the others on my team can do so.

0 Kudos
Highlighted
Employee
19 Views

Still not supported. The request is tracked under DPD200166644. Initially discussed here and here. I inquired about the current status/plans and will share what I learn.

0 Kudos