Re: strange linking problem
- From: Richard E Maine <nospam@xxxxxxxxxxxxx>
- Date: Thu, 28 Apr 2005 08:28:33 -0700
In article <1114645565.383875.105010@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
nicolasbock@xxxxxxxxx wrote:
>... character array...
....
> Character (len=100) :: test = "This is a test"
Michel answered your question. Allow me to just help you avoid a
completely different problem in the future.
What you have is *NOT* a character array. It is a scalar character
string. One can have character arrays in Fortran, but they are not the
same thing. For example
character :: test_array(100)
is an array of characters (of length 1 by default, since the length is
not otherwise specified), and
character(len=42) :: array_of_strings(100)
is an array of character strings, each of which is 42 characters long.
(There are other syntaxes for declaring both of these).
If you refer to character strings as arrays, it is highly likely that
you will eventually make mistakes because of it; the difference does
matter. It is perhaps even more likely that you will get wrong answers
from some future question because someone will answer the question that
you actually ask instead of the one you meant - and the answers might
not be the same.
--
Richard Maine | Good judgment comes from experience;
email: my first.last at org.domain | experience comes from bad judgment.
org: nasa, domain: gov | -- Mark Twain
.
- Follow-Ups:
- Re: strange linking problem
- From: nicolasbock
- Re: strange linking problem
- References:
- strange linking problem
- From: nicolasbock
- strange linking problem
- Prev by Date: Re: compilation problem with module function interface definition
- Next by Date: Re: why doesn't this compile ?
- Previous by thread: Re: strange linking problem
- Next by thread: Re: strange linking problem
- Index(es):
Relevant Pages
|