public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "burnus at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/27997] Fortran 2003: Support type-spec for array constructor
Date: Tue, 01 Apr 2008 14:18:00 -0000	[thread overview]
Message-ID: <20080401141803.25347.qmail@sourceware.org> (raw)
In-Reply-To: <bug-27997-1719@http.gcc.gnu.org/bugzilla/>



------- Comment #18 from burnus at gcc dot gnu dot org  2008-04-01 14:18 -------
> I see, thanks!  I thought it would be the longest length (i.e., clipped by the
> array definition assigned to).

For completeness: See "4.7 Construction of array values" in the Fortran 2003
standard (http://gcc.gnu.org/wiki/GFortranStandards). There one finds:

"C494 (R466) If type-spec is omitted, each ac-value expression in the
array-constructor shall have the same type and kind type parameters."

This does not apply yet as we have everywhere default-kind character variables.
But it continues a few lines later as follows (note the "same length type
parameter"):

"If type-spec is omitted, each ac-value expression in the array constructor
shall have the same length type parameters; in this case, the type and type
parameters of the array constructor are those of the ac-value expressions.

"If type-spec appears, it specifies the type and type parameters of the array
constructor. Each ac-value expression in the array-constructor shall be
compatible with intrinsic assignment to a variable of this type and type
parameters.[...]"


In general, it is quite helpful to look at the specification in the Fortran
standard, when one implements something. (Although it takes some time to get
somewhat used to the standard; still I find it quite readable.) A Fortran
textbook or Reid's F2003 intro
(ftp://ftp.nag.co.uk/sc22wg5/N1601-N1650/N1648.pdf) are helpful, but at the end
the standard is the only official and definite reference. If you need
interpretation help or help searching, write me an email (or try the IRC, link
see http://gcc.gnu.org/wiki/GFortran). It if gets too difficult, one ends up
asking at comp.lang.fortran or even requesting an official interpretation (cf.
PR 34805).


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27997


  parent reply	other threads:[~2008-04-01 14:18 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-12 13:03 [Bug fortran/27997] New: Fortran 2003: Support type-spec for array constructor, i.e. (/ real :: 1., 2., 3. /) tobias dot burnus at physik dot fu-berlin dot de
2006-09-28  8:02 ` [Bug fortran/27997] Fortran 2003: Support type-spec for array constructor fxcoudert at gcc dot gnu dot org
2007-11-08 18:59 ` fxcoudert at gcc dot gnu dot org
2007-12-14 16:24 ` burnus at gcc dot gnu dot org
2007-12-14 17:20 ` burnus at gcc dot gnu dot org
2008-03-24 20:02 ` d at domob dot eu
2008-03-25 12:44 ` d at domob dot eu
2008-03-25 12:51 ` fxcoudert at gcc dot gnu dot org
2008-03-25 12:59 ` fxcoudert at gcc dot gnu dot org
2008-03-25 16:05 ` burnus at gcc dot gnu dot org
2008-03-25 16:41 ` d at domob dot eu
2008-03-25 16:55 ` fxcoudert at gcc dot gnu dot org
2008-03-25 17:11 ` d at domob dot eu
2008-03-25 19:54 ` d at domob dot eu
2008-03-28 10:32 ` burnus at gcc dot gnu dot org
2008-04-01  8:13 ` d at domob dot eu
2008-04-01 10:18 ` burnus at gcc dot gnu dot org
2008-04-01 12:54 ` d at domob dot eu
2008-04-01 14:18 ` burnus at gcc dot gnu dot org [this message]
2008-04-04 20:27 ` d at domob dot eu
2008-04-04 22:44 ` burnus at gcc dot gnu dot org
2008-04-06 15:29 ` d at domob dot eu
2008-04-06 16:23 ` burnus at gcc dot gnu dot org
2008-04-08 13:12 ` d at domob dot eu
2008-04-11 20:27 ` d at domob dot eu
2008-05-16 19:51 ` burnus at gcc dot gnu dot org
2008-05-16 19:55 ` burnus at gcc dot gnu dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080401141803.25347.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).