From owner-sc22wg5+sc22wg5-dom9=www.open-std.org@open-std.org  Thu Sep 19 03:33:56 2024
Return-Path: <owner-sc22wg5+sc22wg5-dom9=www.open-std.org@open-std.org>
X-Original-To: sc22wg5-dom9
Delivered-To: sc22wg5-dom9@www.open-std.org
Received: by www.open-std.org (Postfix, from userid 521)
	id 16A94357044; Thu, 19 Sep 2024 03:33:56 +0200 (CEST)
Delivered-To: sc22wg5@open-std.org
Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam02on2082.outbound.protection.outlook.com [40.107.212.82])
	by www.open-std.org (Postfix) with ESMTP id 65AF1356FFE
	for <sc22wg5@open-std.org>; Thu, 19 Sep 2024 03:33:54 +0200 (CEST)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
 b=Uy3V5gDsC5+vLJebq/J31o/HkgNXgF6Fl3is/IXfzIqK3isCnwaI2IV92bLU0e8Jsasxw8XBbPrfPCryDVUl1Or/b0Nl7MYYwyFYV1KlA1PbnWTO8yxcU28ZDCLOFvYIgOtiOYoYJAoXxZMSV1XHET82nGDp6fM7BxsrIdkYY34vt+9HEkn4ujw1WdtAMt0WgSh9BbkhMzFAkvnaOjbci0N2ItKg0DQ3eiAQalX34JWvS/+WEtLjg9DbcRhVwERXwaWKNlyonUCF1d2MEljwzOI+DAm/ycMukY6y1OzZxhK137sGtNjgkf0pxNr2qQhbe+BPt+MQYR0cgSsyxECADQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
 s=arcselector10001;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
 bh=G5sm13YKuqriv1YK2XOdCPk+4ILqiH2WrJnoKMdmizo=;
 b=ANNvqfA7ZaG/d4v+chsAvite83HOynOYHotvofGau+d33Mrcy3FQqfNMQb2Ah3aOQFlGQ49n32Gjh4y6jdELoAO0q2BbGvnGHP3bJpT6zQf1Eq/4b1in+cY3h3h2hZ3Mnxn/Xe8lZ0Sz0BPmhgmOJuZQI5YhgImjY47HxCaPkmikh8qZrbJzHshLPhaSVSF5kamD2XLM7RzClRQOUBg6p3HfO7e8vLIZZ3o8+ZGfYjndREUrLG2b4v3diX57YeMX4IsrEwDvPtCwC8STbj9zNCrG7nGNbk/ZYFnIqKGu+U5Xw4Cncm+A7LqfKK+7pswNOLL25XSr/RbZqev5jjFZUw==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
 smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass
 header.d=amd.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=G5sm13YKuqriv1YK2XOdCPk+4ILqiH2WrJnoKMdmizo=;
 b=RYovRk8/iOAiDLqLO2wKm7Dl+mJl8K1x82lddnw9zg+LiJM0W/Z7mBYj9BeXAXD5Fsj7C2WosMv8PGShcvSz2m/iQWHugoDh/OsFtKT8FH7woWcjRoH1vvGOYeiThwXn/JSD+35jfzd78tw5ze5NSn3XVRUjn4Sl+34S9+kRzLg=
Received: from SA3PR12MB7998.namprd12.prod.outlook.com (2603:10b6:806:320::13)
 by PH0PR12MB7908.namprd12.prod.outlook.com (2603:10b6:510:28e::10) with
 Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7962.25; Thu, 19 Sep
 2024 01:33:50 +0000
Received: from SA3PR12MB7998.namprd12.prod.outlook.com
 ([fe80::5339:edd4:3555:7e20]) by SA3PR12MB7998.namprd12.prod.outlook.com
 ([fe80::5339:edd4:3555:7e20%5]) with mapi id 15.20.7962.022; Thu, 19 Sep 2024
 01:33:50 +0000
From: "Klemm, Michael" <Michael.Klemm@amd.com>
To: Jeff Hammond <jehammond@nvidia.com>, General J3 interest list
	<j3@mailman.j3-fortran.org>, 'WG5' <sc22wg5@open-std.org>
CC: Malcolm Cohen <malcolm@nag-j.co.jp>
Subject: RE: [J3] [SC22WG5.6606] RE: [ukfortran] intent(in) and value
Thread-Topic: [J3] [SC22WG5.6606] RE: [ukfortran] intent(in) and value
Thread-Index: AQHbCZdfpjrnFeoniUyOOM2btOyzPrJdQviAgAAliMWAAOwHsA==
Date: Thu, 19 Sep 2024 01:33:50 +0000
Message-ID:
 <SA3PR12MB7998861FA4DFD31AA1F454EAF6632@SA3PR12MB7998.namprd12.prod.outlook.com>
References:
 <LV3PR12MB90956B210D8135B74A486302CB622@LV3PR12MB9095.namprd12.prod.outlook.com>
 <20240918092035.40F30357023@www.open-std.org>
 <LV3PR12MB90956BC67608F7113F8985D2CB622@LV3PR12MB9095.namprd12.prod.outlook.com>
In-Reply-To:
 <LV3PR12MB90956BC67608F7113F8985D2CB622@LV3PR12MB9095.namprd12.prod.outlook.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
msip_labels:
 MSIP_Label_94523dde-f9d1-4aa7-80a9-c0900420d3c3_ActionId=26b74b4b-19d9-4815-9081-8eb84f21b7ee;MSIP_Label_94523dde-f9d1-4aa7-80a9-c0900420d3c3_ContentBits=0;MSIP_Label_94523dde-f9d1-4aa7-80a9-c0900420d3c3_Enabled=true;MSIP_Label_94523dde-f9d1-4aa7-80a9-c0900420d3c3_Method=Privileged;MSIP_Label_94523dde-f9d1-4aa7-80a9-c0900420d3c3_Name=Non-Business_New;MSIP_Label_94523dde-f9d1-4aa7-80a9-c0900420d3c3_SetDate=2024-09-19T01:33:42Z;MSIP_Label_94523dde-f9d1-4aa7-80a9-c0900420d3c3_SiteId=3dd8961f-e488-4e60-8e11-a82d994e183d;
authentication-results: dkim=none (message not signed)
 header.d=none;dmarc=none action=none header.from=amd.com;
x-ms-publictraffictype: Email
x-ms-traffictypediagnostic: SA3PR12MB7998:EE_|PH0PR12MB7908:EE_
x-ms-office365-filtering-correlation-id: dc36a5d7-e333-4ea9-fc4f-08dcd84b1d60
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;ARA:13230040|366016|1800799024|376014|38070700018;
x-microsoft-antispam-message-info:
 =?us-ascii?Q?oK3YreVAjJ0OHNfltM+NTqtfzH4h4c2QohPPASOeNg7mluWwcl00+DvzwyCh?=
 =?us-ascii?Q?70x0LjYr5nZlfo0HK2OZcn7S/SDxuFwMLUQs5fqPiWIRhgpuyEOi4sXGAMLD?=
 =?us-ascii?Q?sHrD5t3iMchXrBNQ4IPKMTPDxhO/koFgk3wnirQ97xzH8inE17NRO8DXlnpI?=
 =?us-ascii?Q?WAgjnR/yFY7VJqeAy2wT/HFYUbYKyrdq+sVkZnzmVcbevyONI58VhsMElloF?=
 =?us-ascii?Q?MIVbl88tOjVIp1XLt/vdqGNtGLl2p6+J2gQ+FKlVsm16p6UES1nkwW+2BZce?=
 =?us-ascii?Q?4Q07pwpCA7lqjGc1qTnsZ51/Q2Kv8kiCdvadgNfBb3JURKLInKmaJxPt2lHF?=
 =?us-ascii?Q?ZcyWdZ35T44Ri+GIEqEFcILJ10c9qggDhZK6AER3fP4snySlCHB8n1H9yjTX?=
 =?us-ascii?Q?xdCDrmVnVbab5RCVB1y86NYR/njDMbXniLtoKqlMW10Y+DJJnKEaKV8KLlwL?=
 =?us-ascii?Q?K46B2O+V2AOoShdrbbCEdd2Yv2ea4Xwn/C24CNJRjldNu8Qt/WkdzEi7IObY?=
 =?us-ascii?Q?FHRMTAlc1MOfWh9hLo87IeXiexVJceZbxzmJtknERayDzABCqqtJUVshHvQh?=
 =?us-ascii?Q?V8tzQThB5E0nyboFuAC+EXGi4n8OzGEPA7SWJwK92WGRpa1pFZTcmctbGcf6?=
 =?us-ascii?Q?yoOEDcGVJl/aYze37a9lVp3CM9K88MKi9b4sOU68g9RPoNxBtW/xe6ibeDV+?=
 =?us-ascii?Q?+fn8Furfxi0T5Hry8xriobr/cEOMjlVNt9mAY6PqtSORIkO63mGCIFp/3qfV?=
 =?us-ascii?Q?BMotjRN1c1OymS9/xogOqRG5JwgXX8S2sWuohTpicpJTG3Pv3pVTr+AdiDs/?=
 =?us-ascii?Q?DlwTq4BSn5V8dzCooCvnrhOtbwA4vDcj1EuDS9bBHgP3lAJ/B87ELmd34m79?=
 =?us-ascii?Q?PcUdHxVeWKjzA9o4xdz42LSCAmQhj7YBUwQ3p1KK4v0O+2OjoZzePww5cXsR?=
 =?us-ascii?Q?Yg13Mt1vloRAhCzzCT7cSIQiuet3Mj51s2TJZCZWH4pgMZncLNUKrq9AMrEk?=
 =?us-ascii?Q?gVN+OcGgpVwUXMMxkB0aHLURaIUQXnU6hJAkHd6ZkOaALsPGeerTA8COlCKO?=
 =?us-ascii?Q?zaOICm7gldmFdiIRghuHTQMaHlK9hgJBYJrMDNJYLDhpslRR7RzVXjs13tM4?=
 =?us-ascii?Q?5UhAM9IcAAA/fnRZcq03EWuyaioHWVI7IVGM/0AiAaRjA51KKRchoDgnU8Be?=
 =?us-ascii?Q?DAB45f9S6h4xaBWBlAPi9EF73S0QplG4UL+bmuqCJxmP1IeEF2r9U/JMf6cR?=
 =?us-ascii?Q?QcETQMGjpQ+bpvR2xsaR3ncUwSTEbfg18AqtwU1YdVEskwSaqmYesjIHxqVD?=
 =?us-ascii?Q?UY+1CrZmwfUyVZIzUGy+fxowahPbMiEaVzz2nMGFpsv6/k4YzwWsDQxr4X3H?=
 =?us-ascii?Q?mUXrjgp581d373MT+vZmppoIDqTf5/sRIfHxezjuIY4KCEBIiw=3D=3D?=
x-forefront-antispam-report:
 CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SA3PR12MB7998.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(376014)(38070700018);DIR:OUT;SFP:1101;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0:
 =?us-ascii?Q?Bxw6b5I8Z44/Nz7X3tX9aTLt8ZUaG7/2ntf2d5Ixe7a3izWlR2PqEc0zq/4L?=
 =?us-ascii?Q?AKDtA76fQBskO7NH8krnLEN8e0A3tWXuwu3KhH2AF87CqNquijotHVwQqUB2?=
 =?us-ascii?Q?ykSV90CgrKxwInbZaglRzyiJX8L4brMNmmsU82Cjgs1J3NEJES6bCD/ZYdAs?=
 =?us-ascii?Q?++7LcOCggWHVBOjoMKmmPLu6fOU86K0aUpqGsiR6kXUov59eHMxZFBHjbQ7e?=
 =?us-ascii?Q?MKxnZH9kBRKzPBNQeSTQws8gWfgoxl+AdJE+wAVvhvTcIpzOPT52BottyR2B?=
 =?us-ascii?Q?9jjlhkKkMeynDrsR8Z+R4QUV9rr0RMDFDH7V416QYIe+orPt0gxQevnbw4CJ?=
 =?us-ascii?Q?b5s7POTcn7WdZrFWEpojvIfe/P4kGQFMtCzE0iiHLliTT4wqv5pBgPXMP51B?=
 =?us-ascii?Q?yfmCClGqJH3Qgo/CWnkiZ++fLq5OLvkziu4tmA+WJIiF4aDXL7/6ByGdx/Zf?=
 =?us-ascii?Q?JDW29+y5EL8vvjdWUQ6XyCw0CnEUXU8xp5ECYxlFHJaRWLEvoUrXA0j7xQBW?=
 =?us-ascii?Q?zkz1Yf3AP7xy3KMwGkitwKQW/Fq0OKRm5ovlH0z8u4vkcYzXMs6nsN1VzBvp?=
 =?us-ascii?Q?JZNW8ZFt6ko3nnmlCyxdul7zQ0BrnT8PtX6xucr/Ma1hQtNDAql/1NZ19uuP?=
 =?us-ascii?Q?bldKfbs5jfxuSCV8+CmWRwjs5UsHUZqhfOrBlo+8UqGPDOdsoceOrAfkegnn?=
 =?us-ascii?Q?HjluL4KqqmYmi+DLcHHkb05G6WJ8TCdJyDcSXloXrYQJ2d5FEwLxFUxIr/2h?=
 =?us-ascii?Q?07BPS55w3n+FpkwAl26qSg6DapCRbfN/sQfZ2xj7y5Hyw7XFKJ+0r+INFyd9?=
 =?us-ascii?Q?wcVcZwTeRKz64PF8Gx6ITmRKWN1eXRKikD6WCOiabJ5IbGS/MNs4GLotY344?=
 =?us-ascii?Q?k2p3hFgEXsajpJHUNTbyzD1RGFIuDqKWz9MH0DHc6Cfcnu6qMxQlQr4R7CAe?=
 =?us-ascii?Q?T98OQyvb20r83pU/sL+ubR0kF1zKzkWxO82RmR8EaqjrOn7PErTOcuLpbvR4?=
 =?us-ascii?Q?9WBz/8cxW72xe72eZ5Lpdleo+KgK9IsJm30FsfdY4ksQb7c0VGuqTVthpxXD?=
 =?us-ascii?Q?PfhhA/8oHrHVsO2LZtkFMOhl0BnSdGPMnN/EQClRFQgm6eypDXjjUzAv6fkq?=
 =?us-ascii?Q?qdI8hua7FXLIHHWgSmTIWYRi0BHj6GRxybPu7b5Rst2L1O70hyNCy+SOi1N4?=
 =?us-ascii?Q?8FK5mhaONEz/lYcAfL0Cj4XPyTjUdR7zP8h/zsgwb6GBRXA/VoyIY5GEaJJN?=
 =?us-ascii?Q?xVoH20FzU2Y8HmNz4vy43YZ+2FgZ4VW032H2VEHYWk6K3ZpjYpayXVvIK+yI?=
 =?us-ascii?Q?8XC5Uskz+aDikXbuWnmqOzfNQsleeITBspknXesolPBh/1jK6PGZ1wKC/FEu?=
 =?us-ascii?Q?kXUOON052duD/Czd1dtoix4H5OVeCHV/vZppxklKeHHxoUdrCUUbJaLugUqw?=
 =?us-ascii?Q?aUsWoV6+/TB4mUY+jCzzhuIwJD5N0zhNHOM1YPsjVZ8rUjiHl6aq5xAAu35C?=
 =?us-ascii?Q?06/u/VKzGfilSb7dGaB1UYURK7R4LG6XCYby186tykKrbbMn0XecuEMxdaU6?=
 =?us-ascii?Q?ipWCpU98RYwhrTbPK/U=3D?=
Content-Type: multipart/alternative;
	boundary="_000_SA3PR12MB7998861FA4DFD31AA1F454EAF6632SA3PR12MB7998namp_"
MIME-Version: 1.0
X-OriginatorOrg: amd.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: SA3PR12MB7998.namprd12.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: dc36a5d7-e333-4ea9-fc4f-08dcd84b1d60
X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Sep 2024 01:33:50.6348
 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: kOHSCcLS0GlwXyXJd2CAXh1Ddhj2yyR90IrK319nHPea/mSl1nowrtr1dxWu6OkdfVtKZ0esLjjya7b05NEOaw==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR12MB7908
Sender: owner-sc22wg5@open-std.org
Precedence: bulk

--_000_SA3PR12MB7998861FA4DFD31AA1F454EAF6632SA3PR12MB7998namp_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Hi folks,

Thanks for the clarification!

One more thing: Is it then sensible to have a variable have the attributes =
VALUE and INTENT(IN) at the same time?

From: Jeff Hammond <jehammond@nvidia.com>
Sent: Wednesday, September 18, 2024 7:29 PM
To: General J3 interest list <j3@mailman.j3-fortran.org>; 'WG5' <sc22wg5@op=
en-std.org>
Cc: Malcolm Cohen <malcolm@nag-j.co.jp>
Subject: Re: [J3] [SC22WG5.6606] RE: [ukfortran] intent(in) and value

Caution: This message originated from an External Source. Use proper cautio=
n when opening attachments, clicking links, or responding.

Thanks.  This is useful context and a helpful explanation.

Jeff

From: J3 <j3-bounces@mailman.j3-fortran.org> on behalf of Malcolm Cohen via=
 J3 <j3@mailman.j3-fortran.org>
Date: Wednesday, 18. September 2024 at 12.20
To: 'WG5' <sc22wg5@open-std.org>
Cc: Malcolm Cohen <malcolm@nag-j.co.jp>
Subject: [J3] [SC22WG5.6606] RE: [ukfortran] intent(in) and value
External email: Use caution opening links or attachments

Hi Jeff,

It is called "unspecified INTENT" not "default INTENT". That is because it =
is not a default, it is that it is not specified. (ASIDE: I don't think we =
use the phrase in the standard itself, but we do when talking about it.)

R828 by itself does not define the INTENT attribute, it defines some syntax=
 - and that is the syntax for specified intent (it's even called "intent-sp=
ec". The whole of 8.5.10 defines the INTENT attribute, and indeed, there is=
 a paragraph about unspecified intent.

INTENT(INOUT) is very different indeed from unspecified intent. In particul=
ar, INOUT requires that the actual argument be a definable variable. There =
is no such requirement for unspecified intent. With unspecified intent you =
simply have to get it right, viz not reference the dummy argument unless it=
 is defined, and not define the dummy argument unless it is definable. This=
 is the world before the invention of INTENT.

To summarise: with no intent-spec, the intent is not "INOUT", or "INOUT exc=
ept stuff", it is "unspecified", and has the same capabilities and limitati=
ons that it had before Fortran 90.

Cheers,
--
..............Malcolm Cohen, NAG Oxford/Tokyo.

From: owner-sc22wg5@open-std.org <owner-sc22wg5@open-std.org> On Behalf Of =
Jeff Hammond
Sent: Wednesday, September 18, 2024 4:12 PM
To: WG5 <sc22wg5@open-std.org>
Subject: [ukfortran] [SC22WG5.6604] intent(in) and value

8.5.10 R828 says that INTENT is IN, OUT or INOUT.

8.5.19 C868 says that VALUE cannot be INTENT(OUT) or INTENT(INOUT)

Should I understand that dummy arguments without an INTENT do not have an i=
mplicit intent corresponding to any of the explicit INTENT types?  I have a=
lways assumed that the default INTENT was INOUT, but that cannot be true si=
nce that would conflict with VALUE in the example below.  It seems the defa=
ult INTENT is "INOUT, unless VALUE, in which case it's IN-but-also-assignab=
le".

subroutine foo(a,b)
    implicit none
    integer, value, intent(in) :: a
    integer, value :: b
    ! integer, value, intent(inout) :: c ! not allowed
    ! integer, value, intent(out) :: d ! not allowed
    ! a =3D 21 ! can't assign because intent(in)
    b =3D 23 ! can assign
end subroutine foo

Thanks

Jeff

--_000_SA3PR12MB7998861FA4DFD31AA1F454EAF6632SA3PR12MB7998namp_
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr=
osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" xmlns=3D"http:=
//www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dus-ascii"=
>
<meta name=3D"Generator" content=3D"Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
	{font-family:Verdana;
	panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
	{font-family:Aptos;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	font-size:10.0pt;
	font-family:"Aptos",sans-serif;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-size:10.0pt;
	mso-ligatures:none;}
@page WordSection1
	{size:612.0pt 792.0pt;
	margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=3D"EN-US" link=3D"#467886" vlink=3D"#96607D" style=3D"word-wrap:=
break-word">
<div class=3D"WordSection1">
<p class=3D"MsoNormal"><span style=3D"font-size:11.0pt;font-family:&quot;Ar=
ial&quot;,sans-serif">Hi folks,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:11.0pt;font-family:&quot;Ar=
ial&quot;,sans-serif"><o:p>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:11.0pt;font-family:&quot;Ar=
ial&quot;,sans-serif">Thanks for the clarification!<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:11.0pt;font-family:&quot;Ar=
ial&quot;,sans-serif"><o:p>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:11.0pt;font-family:&quot;Ar=
ial&quot;,sans-serif">One more thing: Is it then sensible to have a variabl=
e have the attributes VALUE and INTENT(IN) at the same time?<o:p></o:p></sp=
an></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<div style=3D"border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm =
4.0pt">
<div>
<div style=3D"border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm =
0cm 0cm">
<p class=3D"MsoNormal"><b><span style=3D"font-size:11.0pt;font-family:&quot=
;Calibri&quot;,sans-serif">From:</span></b><span style=3D"font-size:11.0pt;=
font-family:&quot;Calibri&quot;,sans-serif"> Jeff Hammond &lt;jehammond@nvi=
dia.com&gt;
<br>
<b>Sent:</b> Wednesday, September 18, 2024 7:29 PM<br>
<b>To:</b> General J3 interest list &lt;j3@mailman.j3-fortran.org&gt;; 'WG5=
' &lt;sc22wg5@open-std.org&gt;<br>
<b>Cc:</b> Malcolm Cohen &lt;malcolm@nag-j.co.jp&gt;<br>
<b>Subject:</b> Re: [J3] [SC22WG5.6606] RE: [ukfortran] intent(in) and valu=
e<o:p></o:p></span></p>
</div>
</div>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<table class=3D"MsoNormalTable" border=3D"0" cellspacing=3D"0" cellpadding=
=3D"0" align=3D"left" width=3D"100%" style=3D"width:100.0%">
<tbody>
<tr>
<td style=3D"background:#FFB900;padding:5.0pt 2.0pt 5.0pt 2.0pt"></td>
<td width=3D"100%" style=3D"width:100.0%;background:#FFF8E5;padding:5.0pt 4=
.0pt 5.0pt 12.0pt">
<div>
<p class=3D"MsoNormal" style=3D"mso-element:frame;mso-element-frame-hspace:=
2.25pt;mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-el=
ement-anchor-horizontal:column;mso-height-rule:exactly">
<b><span style=3D"font-size:12.0pt;color:#222222">Caution:</span></b><span =
style=3D"font-size:12.0pt;color:#222222"> This message originated from an E=
xternal Source. Use proper caution when opening attachments, clicking links=
, or responding.
<o:p></o:p></span></p>
</div>
</td>
</tr>
</tbody>
</table>
<p class=3D"MsoNormal"><span style=3D"font-size:12.0pt"><o:p>&nbsp;</o:p></=
span></p>
<div>
<p class=3D"MsoNormal"><span style=3D"font-size:12.0pt">Thanks.&nbsp; This =
is useful context and a helpful explanation.<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:12.0pt"><o:p>&nbsp;</o:p></=
span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:12.0pt">Jeff<o:p></o:p></sp=
an></p>
<p class=3D"MsoNormal"><span style=3D"font-size:12.0pt"><o:p>&nbsp;</o:p></=
span></p>
<div id=3D"mail-editor-reference-message-container">
<div>
<div>
<div style=3D"border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm =
0cm 0cm">
<p class=3D"MsoNormal" style=3D"margin-bottom:12.0pt"><b><span lang=3D"EN-G=
B" style=3D"font-size:12.0pt;color:black">From:
</span></b><span lang=3D"EN-GB" style=3D"font-size:12.0pt;color:black">J3 &=
lt;j3-bounces@mailman.j3-fortran.org&gt; on behalf of Malcolm Cohen via J3 =
&lt;j3@mailman.j3-fortran.org&gt;<br>
<b>Date: </b>Wednesday, 18. September 2024 at 12.20<br>
<b>To: </b>'WG5' &lt;sc22wg5@open-std.org&gt;<br>
<b>Cc: </b>Malcolm Cohen &lt;malcolm@nag-j.co.jp&gt;<br>
<b>Subject: </b>[J3] [SC22WG5.6606] RE: [ukfortran] intent(in) and value<o:=
p></o:p></span></p>
</div>
<table class=3D"MsoNormalTable" border=3D"1" cellpadding=3D"0" style=3D"bac=
kground:#FFEB9C">
<tbody>
<tr>
<td style=3D"padding:.75pt .75pt .75pt .75pt">
<p class=3D"MsoNormal"><b><span style=3D"font-size:7.5pt;font-family:&quot;=
Verdana&quot;,sans-serif;color:black">External email: Use caution opening l=
inks or attachments</span></b><span style=3D"font-size:7.5pt;font-family:&q=
uot;Verdana&quot;,sans-serif;color:black">
</span><span style=3D"font-size:12.0pt"><o:p></o:p></span></p>
</td>
</tr>
</tbody>
</table>
<p class=3D"MsoNormal"><span lang=3D"EN-GB" style=3D"font-size:12.0pt"><o:p=
>&nbsp;</o:p></span></p>
<div>
<div>
<p class=3D"MsoNormal"><span lang=3D"EN-GB" style=3D"font-size:11.0pt;font-=
family:&quot;Calibri&quot;,sans-serif">Hi Jeff,</span><span lang=3D"EN-GB" =
style=3D"font-size:12.0pt"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-GB" style=3D"font-size:11.0pt;font-=
family:&quot;Calibri&quot;,sans-serif">&nbsp;</span><span lang=3D"EN-GB" st=
yle=3D"font-size:12.0pt"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-GB" style=3D"font-size:11.0pt;font-=
family:&quot;Calibri&quot;,sans-serif">It is called &#8220;unspecified INTE=
NT&#8221; not &#8220;default INTENT&#8221;. That is because it is not a def=
ault, it is that it is not specified. (ASIDE: I don&#8217;t think we use th=
e phrase
 in the standard itself, but we do when talking about it.)</span><span lang=
=3D"EN-GB" style=3D"font-size:12.0pt"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-GB" style=3D"font-size:11.0pt;font-=
family:&quot;Calibri&quot;,sans-serif">&nbsp;</span><span lang=3D"EN-GB" st=
yle=3D"font-size:12.0pt"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-GB" style=3D"font-size:11.0pt;font-=
family:&quot;Calibri&quot;,sans-serif">R828 by itself does not define the I=
NTENT attribute, it defines some syntax &#8211; and that is the syntax for =
specified intent (it&#8217;s even called &#8220;intent-spec&#8221;. The
 whole of 8.5.10 defines the INTENT attribute, and indeed, there is a parag=
raph about unspecified intent.</span><span lang=3D"EN-GB" style=3D"font-siz=
e:12.0pt"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-GB" style=3D"font-size:11.0pt;font-=
family:&quot;Calibri&quot;,sans-serif">&nbsp;</span><span lang=3D"EN-GB" st=
yle=3D"font-size:12.0pt"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-GB" style=3D"font-size:11.0pt;font-=
family:&quot;Calibri&quot;,sans-serif">INTENT(INOUT) is very different inde=
ed from unspecified intent. In particular, INOUT requires that the actual a=
rgument be a definable variable. There is no such
 requirement for unspecified intent. With unspecified intent you simply hav=
e to get it right, viz not reference the dummy argument unless it is define=
d, and not define the dummy argument unless it is definable. This is the wo=
rld before the invention of INTENT.</span><span lang=3D"EN-GB" style=3D"fon=
t-size:12.0pt"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-GB" style=3D"font-size:11.0pt;font-=
family:&quot;Calibri&quot;,sans-serif">&nbsp;</span><span lang=3D"EN-GB" st=
yle=3D"font-size:12.0pt"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-GB" style=3D"font-size:11.0pt;font-=
family:&quot;Calibri&quot;,sans-serif">To summarise: with no intent-spec, t=
he intent is not &#8220;INOUT&#8221;, or &#8220;INOUT except stuff&#8221;, =
it is &#8220;unspecified&#8221;, and has the same capabilities and limitati=
ons that
 it had before Fortran 90.</span><span lang=3D"EN-GB" style=3D"font-size:12=
.0pt"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-GB" style=3D"font-size:11.0pt;font-=
family:&quot;Calibri&quot;,sans-serif">&nbsp;</span><span lang=3D"EN-GB" st=
yle=3D"font-size:12.0pt"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-GB" style=3D"font-size:11.0pt;font-=
family:&quot;Calibri&quot;,sans-serif">Cheers,</span><span lang=3D"EN-GB" s=
tyle=3D"font-size:12.0pt"><o:p></o:p></span></p>
<div>
<p class=3D"MsoNormal" style=3D"text-align:justify"><span style=3D"font-siz=
e:10.5pt;font-family:&quot;Calibri&quot;,sans-serif">--
</span><span lang=3D"EN-GB" style=3D"font-size:12.0pt"><o:p></o:p></span></=
p>
<p class=3D"MsoNormal" style=3D"text-align:justify"><span style=3D"font-siz=
e:10.5pt;font-family:&quot;Calibri&quot;,sans-serif">..............Malcolm =
Cohen, NAG Oxford/Tokyo.</span><span lang=3D"EN-GB" style=3D"font-size:12.0=
pt"><o:p></o:p></span></p>
</div>
<p class=3D"MsoNormal"><span lang=3D"EN-GB" style=3D"font-size:11.0pt;font-=
family:&quot;Calibri&quot;,sans-serif">&nbsp;</span><span lang=3D"EN-GB" st=
yle=3D"font-size:12.0pt"><o:p></o:p></span></p>
<div>
<div style=3D"border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm =
0cm 0cm">
<p class=3D"MsoNormal"><b><span lang=3D"EN-GB" style=3D"font-size:11.0pt;fo=
nt-family:&quot;Calibri&quot;,sans-serif">From:</span></b><span lang=3D"EN-=
GB" style=3D"font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif"> =
owner-sc22wg5@open-std.org &lt;owner-sc22wg5@open-std.org&gt;
<b>On Behalf Of </b>Jeff Hammond<br>
<b>Sent:</b> Wednesday, September 18, 2024 4:12 PM<br>
<b>To:</b> WG5 &lt;sc22wg5@open-std.org&gt;<br>
<b>Subject:</b> [ukfortran] [SC22WG5.6604] intent(in) and value</span><span=
 lang=3D"EN-GB" style=3D"font-size:12.0pt"><o:p></o:p></span></p>
</div>
</div>
<p class=3D"MsoNormal"><span lang=3D"EN-GB" style=3D"font-size:12.0pt">&nbs=
p;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:12.0pt">8.5.10 R828 says th=
at INTENT is IN, OUT or INOUT.</span><span lang=3D"EN-GB" style=3D"font-siz=
e:12.0pt"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:12.0pt">&nbsp;</span><span =
lang=3D"EN-GB" style=3D"font-size:12.0pt"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:12.0pt">8.5.19 C868 says th=
at VALUE cannot be INTENT(OUT) or INTENT(INOUT)</span><span lang=3D"EN-GB" =
style=3D"font-size:12.0pt"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:12.0pt">&nbsp;</span><span =
lang=3D"EN-GB" style=3D"font-size:12.0pt"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:12.0pt">Should I understand=
 that dummy arguments without an INTENT do not have an implicit intent corr=
esponding to any of the explicit INTENT types?&nbsp; I have always assumed =
that the default INTENT was INOUT, but that
 cannot be true since that would conflict with VALUE in the example below.&=
nbsp; It seems the default INTENT is &#8220;INOUT, unless VALUE, in which c=
ase it&#8217;s IN-but-also-assignable&#8221;.</span><span lang=3D"EN-GB" st=
yle=3D"font-size:12.0pt"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:12.0pt">&nbsp;</span><span =
lang=3D"EN-GB" style=3D"font-size:12.0pt"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:12.0pt">subroutine foo(a,b)=
</span><span lang=3D"EN-GB" style=3D"font-size:12.0pt"><o:p></o:p></span></=
p>
<p class=3D"MsoNormal"><span style=3D"font-size:12.0pt">&nbsp;&nbsp;&nbsp; =
implicit none</span><span lang=3D"EN-GB" style=3D"font-size:12.0pt"><o:p></=
o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:12.0pt">&nbsp;&nbsp;&nbsp; =
integer, value, intent(in) :: a</span><span lang=3D"EN-GB" style=3D"font-si=
ze:12.0pt"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:12.0pt">&nbsp;&nbsp;&nbsp; =
integer, value :: b</span><span lang=3D"EN-GB" style=3D"font-size:12.0pt"><=
o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:12.0pt">&nbsp;&nbsp;&nbsp; =
! integer, value, intent(inout) :: c ! not allowed</span><span lang=3D"EN-G=
B" style=3D"font-size:12.0pt"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:12.0pt">&nbsp;&nbsp; &nbsp;=
! integer, value, intent(out) :: d ! not allowed</span><span lang=3D"EN-GB"=
 style=3D"font-size:12.0pt"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:12.0pt">&nbsp;&nbsp;&nbsp; =
! a =3D 21 ! can't assign because intent(in)</span><span lang=3D"EN-GB" sty=
le=3D"font-size:12.0pt"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:12.0pt">&nbsp;&nbsp;&nbsp; =
b =3D 23 ! can assign</span><span lang=3D"EN-GB" style=3D"font-size:12.0pt"=
><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:12.0pt">end subroutine foo<=
/span><span lang=3D"EN-GB" style=3D"font-size:12.0pt"><o:p></o:p></span></p=
>
<p class=3D"MsoNormal"><span style=3D"font-size:12.0pt">&nbsp;</span><span =
lang=3D"EN-GB" style=3D"font-size:12.0pt"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:12.0pt">Thanks</span><span =
lang=3D"EN-GB" style=3D"font-size:12.0pt"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:12.0pt">&nbsp;</span><span =
lang=3D"EN-GB" style=3D"font-size:12.0pt"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:12.0pt">Jeff</span><span la=
ng=3D"EN-GB" style=3D"font-size:12.0pt"><o:p></o:p></span></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>

--_000_SA3PR12MB7998861FA4DFD31AA1F454EAF6632SA3PR12MB7998namp_--
