Re: Argument of subroutine is an array of unfixed length.



Richard E Maine wrote:
> In article <d9tvkb$h9v$1@xxxxxxxxxxxxxxxxxxxx>,
> Rich Townsend <rhdt@xxxxxxxxxxxxxxxxxxx> wrote:
>
>
>>David Frank wrote:
>>
>>>integer :: a(6) = [1:6]
>>
>>Is [1:6] standard sytax for some form of implied do-loop initialization?
>
>
> No. At least nor for any definition of "standard" that involves acronyms
> like ISO or ANSI. (We do have a thread participant who commonly uses a
> "different" definition of "standard", so keep that in mind.)
>
> The square brackets are standard array syntax in f2003, but the 1:6 is
> not a standard form. I recall once wishing that a simple form like that
> could be used for array constructors, but it can't. Implied DOs are much
> more flexible, but alas, a bit "wordier" as a consequence.
>

Hmmm, I thought I smelled a rat when David claimed [1:6] was standard. I
guess his idea of standard is "works with the One True Compiler(*)"

cheers,

Rich

(*) Soon to change identity, for reasons discussed elsewhere.
.



Relevant Pages