From owner-sc22wg5+sc22wg5-dom9=www.open-std.org@open-std.org  Wed Sep 18 13:29:23 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 EA8C6357023; Wed, 18 Sep 2024 13:29:22 +0200 (CEST)
Delivered-To: sc22wg5@open-std.org
Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2046.outbound.protection.outlook.com [40.107.236.46])
	by www.open-std.org (Postfix) with ESMTP id 55A0D356F18
	for <sc22wg5@open-std.org>; Wed, 18 Sep 2024 13:29:20 +0200 (CEST)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
 b=DIllLkYLwKjHTaKDDPGqQCioGyshyxcVzbqp36W2Gptmy8acIGNGxtSnMgZfvUOf4MbUxBU+XZXYdvDEkcDPqMgeEUH4LxlPUDu0h5ti1dcPo3pRR3XCrDTleNbTFTguGrxdhSAEMD0/iOFu8I996FeE+TNa+e/z/aiGUIvbSdVfqzSasJbB36NSvHuDQe12JWenStdP/OS8ztYnBQ54mR0SUrOgMRqN8a3xLIDVsbvtOVCvrPdbNZC5h5B4i4RPUNgio25OFu3Aka3z6U1Zf+QKmRJX/8E+m1q3XECHrxp2MBpcvYIrWCxyhgWdKxEk5OCiocVPL0zu4F82GxEoaA==
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=8/NJIEg2jfq+AsRs6g/hgDOTpLhd+m/PrdjxRsEjy6w=;
 b=dRxikZ1okBqZxBzFoNJMNqFMtczsUd5e4OklcN7yrpD+F3fCuwJU/tn2sAaNrKehrigg0AnaviL+6Z8Bb8mnpSvyZ4UCOQtybuSCGOop7OeIgWWJ7dQG76VflMf2cn1oTaHFmZKgfIAuMavKjW9WFsYD4YHhZVwAbXTQZoV0/mk4c3WaK0f0C7+tIStP3hhhirBOq5tW+wQv23UoGPJHDtJkOYDu0d5cMayBwh8zOnD8eJKIoj8XyOT8iqDLvPvtX9FpmG+w/ilFaYaS2Qz3WYpX516qdjtjukqU4OlL+G08d312e/muT7dcibH5v5YhVCbZLzvmL+9qj19l5K+fuQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
 smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com;
 dkim=pass header.d=nvidia.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com;
 s=selector2;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=8/NJIEg2jfq+AsRs6g/hgDOTpLhd+m/PrdjxRsEjy6w=;
 b=cn2+HWrbr4n7lhB6o+1YbEnIZQJhtm9OUHnvTyXbutGMucqcTa/pvSvFikt5/hV0hzom5+RPUmU2adbKJwx3ZXMGCKDVL3ZFD9bHEFsuX8XD3ytSN0Z+Bj0NFrRqUC9KJ1vIv3MKe7N+bjKYRGC3tenuVvkih1iBDpZW6e/lFUrjBOE67bnGgDjs4Co6R79u4vSRNAkWEALHbqKOLaO6GId2vvzGEsqR43t1uD8PEZ5ozdOILqMR++bk5gUKdWBHiMZ0CxjIdVSrzJ5C/UBOx1/geokbGEGXvGZzpnwb+50cs48s2KQFynS6lNGqpZ6QXPVZjnCjyoPDbs6RqToyVQ==
Received: from LV3PR12MB9095.namprd12.prod.outlook.com (2603:10b6:408:1a6::22)
 by MN2PR12MB4256.namprd12.prod.outlook.com (2603:10b6:208:1d2::14) with
 Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7962.24; Wed, 18 Sep
 2024 11:29:12 +0000
Received: from LV3PR12MB9095.namprd12.prod.outlook.com
 ([fe80::e8c:f2db:ab98:4538]) by LV3PR12MB9095.namprd12.prod.outlook.com
 ([fe80::e8c:f2db:ab98:4538%7]) with mapi id 15.20.7962.022; Wed, 18 Sep 2024
 11:29:12 +0000
From: Jeff Hammond <jehammond@nvidia.com>
To: 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: AQHbCZdfpjrnFeoniUyOOM2btOyzPrJdQviAgAAliMU=
Date: Wed, 18 Sep 2024 11:29:11 +0000
Message-ID:
 <LV3PR12MB90956BC67608F7113F8985D2CB622@LV3PR12MB9095.namprd12.prod.outlook.com>
References:
 <LV3PR12MB90956B210D8135B74A486302CB622@LV3PR12MB9095.namprd12.prod.outlook.com>
 <20240918092035.40F30357023@www.open-std.org>
In-Reply-To: <20240918092035.40F30357023@www.open-std.org>
Accept-Language: en-FI, en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: dkim=none (message not signed)
 header.d=none;dmarc=none action=none header.from=nvidia.com;
x-ms-publictraffictype: Email
x-ms-traffictypediagnostic: LV3PR12MB9095:EE_|MN2PR12MB4256:EE_
x-ms-office365-filtering-correlation-id: b5ff1709-3ed3-4c4f-e82e-08dcd7d51e89
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;ARA:13230040|376014|1800799024|366016|38070700018;
x-microsoft-antispam-message-info:
 =?Windows-1252?Q?iRpoyRPjr5DHs7jR4h9QSv8NO3Fw27s29uTnVr5wQ0Lbk9bsU6+XDjFL?=
 =?Windows-1252?Q?HGwbnQhB+EjzU53WNzKb11c52IhhDYFWucQyWxnig287EVYyRDq/A9hR?=
 =?Windows-1252?Q?QmnNTVXLI8qexcwKMS7Rrf34Tg973SjAqZqfPMFSs5CCXbkpVnZg+Ac1?=
 =?Windows-1252?Q?JPnyot09qRt0P4EZAQBFiZ7oRgl14Wmwx762Syre/sChsPAYmXdOpnkq?=
 =?Windows-1252?Q?ONHio+Abc48nXypy39ijSXvemOjI0G+LwzFz4GbTn0MSqa/UtFlJhvk3?=
 =?Windows-1252?Q?vE7HKDaXjKzx9YfZc0iUz9v7kpujFcIkw67t01B/7qmCUjDTQ/BsYWnW?=
 =?Windows-1252?Q?nE2lrTMDPQ6q9lSAvi1yTY3QfRSDvP9MqiL7JWrKePJF9UNdXVDVeuLw?=
 =?Windows-1252?Q?qIEkenAOQV2cqtiuL888m6MVVMqFfNsDla2KDa92kjO7ewCSasVikXQ9?=
 =?Windows-1252?Q?aLjjlt81sEChzLGeQkhCTvOsuc2Z2KeFWMdv7uc/28Xf7MU2zp91vRt6?=
 =?Windows-1252?Q?1SnwjrrJyIWRzJ+I33TOoTBlQl7aukGxn7U/yzKMP76t3ngPHFNU3klz?=
 =?Windows-1252?Q?nneYOCMKTpSbdthsgOpy+VQXSL9+q1Us0IIuW9vLAeFkN77vA9KjM4uR?=
 =?Windows-1252?Q?pezV5DVino4bGwqLNeFd1EBGWfZJS5/mie16/YktG9KI2v8fDZhc1s7d?=
 =?Windows-1252?Q?LmahoqtyyLrwQPid/1/1DEtwdTaY2J08ExA32kaqvK6ehLT1xWN8mPoD?=
 =?Windows-1252?Q?5vBea2xnxA5aMV65XdEps2EkcfdNLkNvyIAvm2DO725tp8Qzn7gTndqO?=
 =?Windows-1252?Q?xb23+jh1jCOBkbjXZuv8mt9+wxqXkCX7GVJT+lv0fFIP2P7Eo2A0+sfY?=
 =?Windows-1252?Q?fU/cW8n4nrrLXkjBiJgiqxtQp5dLze7Jt34b6VsVJJFeg8EItOmPVcWS?=
 =?Windows-1252?Q?1O/8jBa9ZJWQEZw8SPcvuztV+52gNBWa3psx92BW5kuGdzGhNuGCNMWK?=
 =?Windows-1252?Q?xqy2ZJ91kWBrAuAMBaE6J3LU7aPKU1G1lTVF3hsfqpESkSRHitRUb5mi?=
 =?Windows-1252?Q?xokJ1zPhbJWJqIOyGzlPJ+3If6j6B0J7t3GJyS6AIX9vlq6EGiPTUMbg?=
 =?Windows-1252?Q?2QbDk9YqxavAH4kSwuU/f+nP6aIzKHgXQhXVt6PlXH3zT1TtQYrq9v7S?=
 =?Windows-1252?Q?tN/qZmQ3xD6bLWZBvM+r2PSZEs2PU//TVjrfWcBFVWGcXjXgJVeXLmSo?=
 =?Windows-1252?Q?I3ulpTdvsI2ufXNHIpCx7FrAaID8MGqzJtDYBqdbdT1qo9CGO4IJGocL?=
 =?Windows-1252?Q?Y3G8xJH4feXteItVCzpUz6hLePOdEfG4BkehDUMBYi5OEadB2Np73Cm5?=
 =?Windows-1252?Q?jCjs7ZJSjbFFT/VxB/il3PxBQvAtiQX1C4RWbVZFAKcTTeAC9bwbDQZE?=
 =?Windows-1252?Q?yC1rHwES6m9yhUS3N4VK9C29QV258qBkwBavtbd8Umsz2SW+/X3GkwE5?=
 =?Windows-1252?Q?c+ty7wOp+SVTT7/WriA106Kbpiub6g=3D=3D?=
x-forefront-antispam-report:
 CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:LV3PR12MB9095.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(1800799024)(366016)(38070700018);DIR:OUT;SFP:1101;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0:
 =?Windows-1252?Q?7X/AsfWFEJ0ZfHsgyQPTyDTtep0CxTDLUMC9cafOjp4lkOFKDYqknwta?=
 =?Windows-1252?Q?eDR+q1cRJPH63eP28Dm1/+TXISe/67fFK4tE4TRY0FtdQmS0hLyjn8qS?=
 =?Windows-1252?Q?7KcVxZNyjqzrhU2JYifSpN/fqkWhHAl3A2QeW1BVNLn8tvpU4lkrIcJW?=
 =?Windows-1252?Q?fe+BZTdGqrdMJp1DIb7RQgzy0lZpktJAwhF/tyFp/68CZKTw1a8K3Fhj?=
 =?Windows-1252?Q?odtT4N/IHH51zsrg1ozQtXuREn0s0e6ymir+CseDcpCDx9J5+lLgAY1S?=
 =?Windows-1252?Q?Y0sQGt1wxzaJc1bmDWPDuquouY5kr5DUkteipwmRxLgdn2Sel+4klVmJ?=
 =?Windows-1252?Q?chLyoeZ8/uRPLMFTwFYxUf8ylQd3XWFZi7+2zIRQGcoLzL5nQh6v38Gl?=
 =?Windows-1252?Q?ThfuXo7XherL11FWwVRcuGgff9arVluLfTKPS8WHQ5whQSIc1Rn+DAJv?=
 =?Windows-1252?Q?rMpJEDJoSBsETgj7yhyOdHy1e5Rx0LWM1CNxFC8E8S65zj8Bv5P0EtUe?=
 =?Windows-1252?Q?3i/D3DWUpH5mgtyDATqVjeDdGrMaLS1H/PAODoO1BWN8Idw0lAMkpTNJ?=
 =?Windows-1252?Q?9CegLEjnqK1pHzB6gjVHCebkow+DaYh6aoxVafdogta9UIqOQDyNGkTN?=
 =?Windows-1252?Q?If35rrqmnqjI6dp3SJTbht3yqN+2DXMmjF1kVr9uuGB3K75fUszoLUV6?=
 =?Windows-1252?Q?5xsqNbAWSwGJP042mPnqBCUVnOF2/M+8emlIG68Jui0+GfE/OKRmyidz?=
 =?Windows-1252?Q?CgJ9qONg2qZNHyXgy0kptgLOpR0vCdIWDbnwOZ+KwbhadGnf2GMlx8bz?=
 =?Windows-1252?Q?NPUdf+Uahi8C6ZikAtNod0nBUemoNT4wAunJTcIEkIi1BiWHbckW09O3?=
 =?Windows-1252?Q?OjKpD3LOJkXT+f0GDB/ShPKfhQnEn1C31ocxu3oy+9vouNONeOB2Gs10?=
 =?Windows-1252?Q?aneSkwXUuzu0FrB0VLO3L/Cf9xhON11vtCYyfKF/DrrAzZ5VxL/CrsVJ?=
 =?Windows-1252?Q?xsDd1x/mwfWroxPm8a0wkUU/eIVGK7nrnahyEdtbT44bAjnfDX5L/TSd?=
 =?Windows-1252?Q?jlI/oLweTeipDIgkg+01upxVU4gtuDXL2EmTp8V6d622nl7AjEljmVMf?=
 =?Windows-1252?Q?7abmCu9jX7ClGc1BT/OA3qyFBw4mnddCpNZZxVDUaszyMF6GhiUXMbiX?=
 =?Windows-1252?Q?a48WKSD/It8rPnqYl9+oGqHnGDrwHjnrG2mqTFWLXgCw1xMiVflAN9tF?=
 =?Windows-1252?Q?M6iWaLIXKW2QuTXPByz3R7auF/lkZIZLKbaZQ3PeF7V5r10s6vSGbD3n?=
 =?Windows-1252?Q?IAestAeGOOT7hHofzN14fEgoJ4SHPqlt0SHoPvTMANkOxUyhrdF5bL4a?=
 =?Windows-1252?Q?HkN938iKNIEdDofGBxHlmO9Wg6JBDs6Xgv4CPzQgldbPqDPcJqJ1JlGS?=
 =?Windows-1252?Q?Bm7IGT9P+YCH+GHzUX+68vyP9rcm98Mv8uB0SFQELE3ylTWv1mo9bLmf?=
 =?Windows-1252?Q?sHOC5G7kJefsqq3belU8UgkQWat8w9fE2zowuIR17dE2zcnxkpDoU/qY?=
 =?Windows-1252?Q?2HkShqBg0vMDcqhWg1FvjzL8O7XCFpn/ctQ1CtFjxWxBdHgkGErtAmGC?=
 =?Windows-1252?Q?hJK6kv91jN5K4mvTPLfHBZl6JOlPe8A6zcPI71UqcDH8w/Z7HWkzpLDa?=
 =?Windows-1252?Q?BZL0Hv8YmLiG4MxV6P2uw72wc30jIFCnfw4yVqYWUwXehzt//T6iog?=
 =?Windows-1252?Q?=3D=3D?=
Content-Type: multipart/alternative;
	boundary="_000_LV3PR12MB90956BC67608F7113F8985D2CB622LV3PR12MB9095namp_"
MIME-Version: 1.0
X-OriginatorOrg: Nvidia.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: LV3PR12MB9095.namprd12.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: b5ff1709-3ed3-4c4f-e82e-08dcd7d51e89
X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Sep 2024 11:29:11.9975
 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: z5Xmn5wIhDl+qDsGiPM32ddR38PXP5RwvMXSfsqfYG5SHbilA0cZs3VZCFJEuhf65pkHyfOuOrRc364lIEnnVw==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4256
Sender: owner-sc22wg5@open-std.org
Precedence: bulk

--_000_LV3PR12MB90956BC67608F7113F8985D2CB622LV3PR12MB9095namp_
Content-Type: text/plain; charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

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 =93unspecified INTENT=94 not =93default INTENT=94. That is bec=
ause it is not a default, it is that it is not specified. (ASIDE: I don=92t=
 think we use the phrase in the standard itself, but we do when talking abo=
ut it.)

R828 by itself does not define the INTENT attribute, it defines some syntax=
 =96 and that is the syntax for specified intent (it=92s even called =93int=
ent-spec=94. 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 =93INOUT=94, or =93INO=
UT except stuff=94, it is =93unspecified=94, and has the same capabilities =
and limitations 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 =93INOUT, unless VALUE, in which case it=92s IN-but-also-assi=
gnable=94.

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_LV3PR12MB90956BC67608F7113F8985D2CB622LV3PR12MB9095namp_
Content-Type: text/html; charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

<html xmlns:o=3D"urn:schemas-microsoft-com:office:office" xmlns:w=3D"urn:sc=
hemas-microsoft-com:office:word" xmlns:m=3D"http://schemas.microsoft.com/of=
fice/2004/12/omml" xmlns=3D"http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3DWindows-1=
252">
<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;
	panose-1:2 11 0 4 2 2 2 2 2 4;}
@font-face
	{font-family:"Times New Roman \(Body CS\)";
	panose-1:2 11 6 4 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	font-size:10.0pt;
	font-family:"Aptos",sans-serif;}
span.EmailStyle19
	{mso-style-type:personal-reply;
	font-family:"Aptos",sans-serif;
	color:windowtext;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-size:10.0pt;
	mso-ligatures:none;}
@page WordSection1
	{size:8.5in 11.0in;
	margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
	{page:WordSection1;}
--></style>
</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: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 0in =
0in 0in">
<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 =93unspecified INTENT=
=94 not =93default INTENT=94. That is because it is not a default, it is th=
at it is not specified. (ASIDE: I don=92t think we use the 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 =96 and that is the syntax for spec=
ified intent (it=92s even called =93intent-spec=94. 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 =93INOUT=94, or =93INOUT except stuff=94, it is =93unspeci=
fied=94, and has the same capabilities and limitations 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 0in =
0in 0in">
<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 =93INOUT, unless VALUE, in which case =
it=92s IN-but-also-assignable=94.</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">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>
</body>
</html>

--_000_LV3PR12MB90956BC67608F7113F8985D2CB622LV3PR12MB9095namp_--
