Re: DEALLOCATE Of Non-ALLOCATEd Should Be No-Op

Liste des GroupesRevenir à cl fortran 
Sujet : Re: DEALLOCATE Of Non-ALLOCATEd Should Be No-Op
De : ldo (at) *nospam* nz.invalid (Lawrence D'Oliveiro)
Groupes : comp.lang.fortran
Date : 17. Oct 2024, 06:54:21
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <veq8qd$2l6fb$3@dont-email.me>
References : 1 2
User-Agent : Pan/0.160 (Toresk; )
On Wed, 16 Oct 2024 20:57:17 -0500, Gary Scott wrote:

On 10/16/2024 7:51 PM, Lawrence D'Oliveiro wrote:
>
It’s annoying to find that if you try to DEALLOCATE an ALLOCATABLE
variable that has not been ALLOCATEd (or that has already been
DEALLOCATEd), this is an error.
 
The way these things are handled in Fortran is to add a "stat="
specifier.

But I don’t want to catch errors as a result of invalid, non-NULL pointers
-- let that be trapped as a runtime error as usual. I just want a free of
NULL to be a harmless no-op.

The trouble with “stat=” is like “ON ERROR GOTO” in BASIC of old: you
either catch everything or nothing, you cannot be selective in the
exceptions you catch.

Date Sujet#  Auteur
17 Oct 24 * DEALLOCATE Of Non-ALLOCATEd Should Be No-Op5Lawrence D'Oliveiro
17 Oct 24 `* Re: DEALLOCATE Of Non-ALLOCATEd Should Be No-Op4Gary Scott
17 Oct 24  `* Re: DEALLOCATE Of Non-ALLOCATEd Should Be No-Op3Lawrence D'Oliveiro
17 Oct 24   `* Re: DEALLOCATE Of Non-ALLOCATEd Should Be No-Op2R Daneel Olivaw
17 Oct 24    `- Re: DEALLOCATE Of Non-ALLOCATEd Should Be No-Op1Lawrence D'Oliveiro

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal