public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "boschmann at tp1 dot physik.uni-siegen.de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/45170] [F2003] allocatable character lengths
Date: Tue, 12 Jul 2011 15:01:00 -0000	[thread overview]
Message-ID: <bug-45170-4-beldYPuY0g@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-45170-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #17 from Hans-Werner Boschmann <boschmann at tp1 dot physik.uni-siegen.de> 2011-07-12 15:00:22 UTC ---
This sounds like there is still a lot of work to do in this character issue.
Has anyone ever managed to allocate such strings dynamically? In 

(In reply to comment #15)
> character(:),allocatable::string
> string='yes!!'
> print *, string
> end

the length is constant so you could use character(5)::string. That's not what I
mean, I would like to have something like this:

PROGRAM helloworld
  character(:),allocatable::string
  real::rnd
  call random_number(rnd)
  call hello(ceiling(11*rnd),string)
  print *,string
contains
  subroutine hello (n,string)
    character(:),allocatable,intent(out)::string
    integer,intent(in)::n
    character(10)::helloworld="hello world"
    string=helloworld(:n)
  end subroutine hello
end PROGRAM helloworld

I guess that's not yet possible with gfortran.


  parent reply	other threads:[~2011-07-12 15:01 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-45170-4@http.gcc.gnu.org/bugzilla/>
2010-11-02 17:10 ` burnus at gcc dot gnu.org
2010-11-02 22:32 ` burnus at gcc dot gnu.org
2011-01-27 22:42 ` burnus at gcc dot gnu.org
2011-01-28 14:30 ` pault at gcc dot gnu.org
2011-01-28 15:45 ` burnus at gcc dot gnu.org
2011-01-28 20:59 ` tkoenig at gcc dot gnu.org
2011-01-30 18:17 ` pault at gcc dot gnu.org
2011-02-02 18:09 ` dnovillo at gcc dot gnu.org
2011-02-02 18:18 ` dnovillo at gcc dot gnu.org
2011-07-12 13:51 ` boschmann at tp1 dot physik.uni-siegen.de
2011-07-12 14:20 ` sgk at troutmask dot apl.washington.edu
2011-07-12 14:46 ` burnus at gcc dot gnu.org
2011-07-12 15:01 ` boschmann at tp1 dot physik.uni-siegen.de [this message]
2011-07-15 14:04 ` burnus at gcc dot gnu.org
2011-08-09  2:11 ` damian at rouson dot net
2011-08-09  3:48 ` kargl at gcc dot gnu.org
2011-08-09  4:28 ` damian at rouson dot net
2011-08-09  5:09 ` sgk at troutmask dot apl.washington.edu
2011-08-26 11:10 ` boschmann at tp1 dot physik.uni-siegen.de
2011-08-26 19:36 ` sgk at troutmask dot apl.washington.edu
2011-08-26 20:19 ` boschmann at tp1 dot physik.uni-siegen.de
2011-08-29  7:20 ` burnus at gcc dot gnu.org
2011-08-29 16:32 ` sgk at troutmask dot apl.washington.edu
2011-08-29 17:23 ` burnus at gcc dot gnu.org
2011-08-30 15:41 ` kargl at gcc dot gnu.org
2011-08-30 19:01 ` damian at rouson dot net
2011-08-30 19:45 ` sgk at troutmask dot apl.washington.edu
2012-05-13 10:56 ` burnus at gcc dot gnu.org
2012-05-13 13:10 ` burnus at gcc dot gnu.org
2012-05-15 13:09 ` burnus at gcc dot gnu.org
2012-05-23 20:39 ` burnus at gcc dot gnu.org
2012-05-23 20:48 ` burnus at gcc dot gnu.org
2012-05-24 13:39 ` burnus at gcc dot gnu.org
2012-06-16 18:14 ` burnus at gcc dot gnu.org
2012-06-16 18:29 ` burnus at gcc dot gnu.org
2013-02-05 16:34 ` infinity.probability at gmail dot com
2013-02-05 16:37 ` infinity.probability at gmail dot com
2013-02-05 20:23 ` janus at gcc dot gnu.org
2013-06-13  7:23 ` burnus at gcc dot gnu.org
2013-06-14  7:43 ` burnus at gcc dot gnu.org
2013-09-02 11:26 ` dominiq at lps dot ens.fr
2015-06-04  9:28 ` tkoenig at gcc dot gnu.org
2015-09-03 21:18 ` dominiq at lps dot ens.fr
2010-08-03  1:55 [Bug fortran/45170] New: suspected bug in error generated by allocatable character array clerman at fuse dot net
2010-08-03  5:43 ` [Bug fortran/45170] [F2003] allocatable character lengths burnus at gcc dot gnu dot org
2010-08-03 10:25 ` clerman at fuse dot net
2010-08-15 18:46 ` kargl 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=bug-45170-4-beldYPuY0g@http.gcc.gnu.org/bugzilla/ \
    --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).