Re: How to Read csv Files with both Characters and Numbers?
- From: nospam@xxxxxxxxxxxxx (Richard Maine)
- Date: Sat, 29 Mar 2008 09:35:11 -0700
Lars Mossberg <Lars.Mossberg@xxxxxxxxx> wrote:
! "ierror" returns an error code:....
! 1 "majsplit" is ASSOCIATED on entry
! 2 "majsplit" cannot be allocated
! 3 "minsplit" is ASSOCIATED on entry
Hmm. I presume that you are testing for this to help avoid things like
memory leaks. I'd be concerned, however, that such a test might be more
prone to cause problems than to find them. In particular, it is
nonstandard to even do the test if the pointer association status is
undefined, which is the initial state of pointers by default. An awful
lot of pointer-related problems are related to undefined association
status.
In this particular case, it would seem fine for the association status
to be undefined on entry, but the test might well give the misleading
result associated() returning true (or it might even abort if you have a
compiler that tries to catch such errors). One could avoid this with
sufficient discipline in the calling code, but I'd personally think that
requires at least as much discipline as is needed to avoid whatever
problems thisi test is trying to guard against.
Like many uses of pointers, this one pretty clearly "wants" to be an
allocatable, which wouldn't have such problems, but allocatables were
not allowed in such contexts until quite recently (f95+TR or f2003, and
it took quite a long time for compilers to get the TR implemented
reasonably well).
--
Richard Maine | Good judgement comes from experience;
email: last name at domain . net | experience comes from bad judgement.
domain: summertriangle | -- Mark Twain
.
- References:
- How to Read csv Files with both Characters and Numbers?
- From: qquito
- Re: How to Read csv Files with both Characters and Numbers?
- From: glen herrmannsfeldt
- Re: How to Read csv Files with both Characters and Numbers?
- From: Kurt Kallblad
- Re: How to Read csv Files with both Characters and Numbers?
- From: glen herrmannsfeldt
- Re: How to Read csv Files with both Characters and Numbers?
- From: qquito
- Re: How to Read csv Files with both Characters and Numbers?
- From: relaxmike
- Re: How to Read csv Files with both Characters and Numbers?
- From: Richard Maine
- Re: How to Read csv Files with both Characters and Numbers?
- From: Lars Mossberg
- How to Read csv Files with both Characters and Numbers?
- Prev by Date: Re: How to Read csv Files with both Characters and Numbers?
- Next by Date: Re: Rounding off double precision
- Previous by thread: Re: How to Read csv Files with both Characters and Numbers?
- Next by thread: Re: How to Read csv Files with both Characters and Numbers?
- Index(es):
Relevant Pages
|
|