- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page