This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
PROTECTED ATTRIBUTE, when will it be accepted?
- From: Hugo Mahr <HugoMahr at web dot de>
- To: fortran at gcc dot gnu dot org
- Date: Wed, 21 Sep 2005 12:16:36 +0200
- Subject: PROTECTED ATTRIBUTE, when will it be accepted?
- Reply-to: HugoMahr at web dot de
Hi,
I like to use the PROTECTED attribute. It is not recognized yet.
See for example:
ISO/IEC JTC1/SC22/WG5 N1458,
Subject: MTE: The PROTECTED attribute.
From: Malcolm Cohen
To: Whomever it may concern
Date: July 2001
Is there a plan when it will be available as an extension (although it is not
in the f95 standard) ?
Regards Hugo
----------------example
gfortran example.f90
In file example.f90:2
REAL,PROTECTED :: temp_
1
Error: Syntax error in data declaration at (1)
In file example.f90:5
REAL,INTENT(IN) ::
1
Error: Syntax error in data declaration at (1)
In file example.f90:7
temp_f = temp_c*(9.0/
1
Error: Expected a right parenthesis in expression at (1)
cat example.f90
MODULE temperature
REAL,PROTECTED :: temp_
CONTAINS
SUBROUTINE set_temperature_
REAL,INTENT(IN) ::
temp_c = c
temp_f = temp_c*(9.0/
END SUBROUTINE
END MODULE