Re: Standards conforming or not?



On Mon, 27 Feb 2006 15:01:43 +0000, Michael Metcalf put fingers to
keyboard and said:


"Bruce Bowler" <bbowler@xxxxxxxxxxx> wrote in message
news:pan.2006.02.27.14.27.38.589097@xxxxxxxxxxxxxx
Does the following code conform to the Fortran 95 standard?

No. If an array is assumed-size, the DIM parameter must be present in the
reference to SIZE. Of course, with assumed-shape and an explicit interface
all would work as expected.

Regards,

Mike Metcalf

So if I change the write to

write (6,*) size(a,1)

it is standards conforming?

(I realize I could go with the interface and "all would be right with the
world", but in the "real world" example from which this is taken, I'd
rather not if I don't have to.)

If that is now standards conforming, what should be written? 5 or 10?

--
+-------------------+---------------------------------------------------+
Bruce Bowler | If you don't have the time you can't commit the
1.207.633.9600 | crime. - Robert Baker
bbowler@xxxxxxxxxxx |
+-------------------+---------------------------------------------------+

.



Relevant Pages

  • Re: Standards conforming or not?
    ... If an array is assumed-size, the DIM parameter must be present in the ... reference to SIZE. ... with assumed-shape and an explicit interface ...
    (comp.lang.fortran)
  • Re: short question concerning SIZE
    ... [about sizeof an assumed-size array] ... assumed-shape array and an explicit interface of some sort instead. ... So if you are wanting to ask about the size of an assumed-size dummy, ...
    (comp.lang.fortran)