David Vowles wrote:
> I would be most grateful for advice on the following.
>
> I want to declare a zero sized integer array with the PARAMETER attribute.
>
> The following declaration appears to work correctly:
>
> INTEGER, DIMENSION(0), PARAMETER :: IPAR = RESHAPE((/ 0 /), (/ 0 /))
>
> The above syntax seems a little opaque. Is there a more obvious way of
> doing this?
>
Maybe not less opaque, but this ought to work:
integer, dimension(0), parameter :: ipar = (/ ( i, i=1,0 ) /)
> Note: the following "obvious" syntax is invalid:
>
> INTEGER, DIMENSION(0), PARAMETER :: IPAR = (//)
>
> Many thanks,
> David.
>
|