Re: Is there any problem with the following program?
- From: Rich Townsend <rhdt@xxxxxxxxxxxxxxxxxxx>
- Date: Fri, 29 Dec 2006 22:49:35 -0500
Beliavsky wrote:
zhngbn wrote:
I find the following program in a book:
program ex0413
character(len=20) string
string = "Good morning."
write(*, *) string
string(6) = "evening."
write instead
string(6:) = "evening."
(note the colon) and the program works.
write(*, *) string
end
When it is complied by CVF, the following error is displayed:
Error: This name has not been declared as an array. [STRING]
string(6) = "evening."
So, can anyone tell me what is the problem? Thanks a lot.
The variable "string" is NOT an array, so the CVF error message is
correct.
Can the OP tell us which book it was, so we can avoid buying it, or borrow it
from the library and laugh at it?
.
- References:
- Is there any problem with the following program?
- From: zhngbn
- Re: Is there any problem with the following program?
- From: Beliavsky
- Is there any problem with the following program?
- Prev by Date: Re: Is there any problem with the following program?
- Next by Date: Re: Proper way to return a string
- Previous by thread: Re: Is there any problem with the following program?
- Next by thread: Re: Is there any problem with the following program?
- Index(es):
Relevant Pages
|