From owner-sc22wg5+sc22wg5-dom8=www.open-std.org@open-std.org  Fri Dec  5 02:40:42 2014
Return-Path: <owner-sc22wg5+sc22wg5-dom8=www.open-std.org@open-std.org>
X-Original-To: sc22wg5-dom8
Delivered-To: sc22wg5-dom8@www.open-std.org
Received: by www.open-std.org (Postfix, from userid 521)
	id C2FFA358484; Fri,  5 Dec 2014 02:40:42 +0100 (CET)
Delivered-To: sc22wg5@open-std.org
X-Greylist: delayed 927 seconds by postgrey-1.34 at www5.open-std.org; Fri, 05 Dec 2014 02:40:41 CET
Received: from nag-j.co.jp (nag-j.co.jp [111.68.142.10])
	by www.open-std.org (Postfix) with ESMTP id EDC993572EA
	for <sc22wg5@open-std.org>; Fri,  5 Dec 2014 02:40:38 +0100 (CET)
Received: from Maru6 (218-42-159-105.cust.bit-drive.ne.jp [218.42.159.105])
	(authenticated bits=0)
	by nag-j.co.jp (8.14.5/8.14.5) with ESMTP id sB51PEPL000967
	for <sc22wg5@open-std.org>; Fri, 5 Dec 2014 10:25:17 +0900 (JST)
	(envelope-from malcolm@nag-j.co.jp)
Message-ID: <AAD2C7FDF14F4984A3B063A995DA982D@Maru6>
From: "Malcolm Cohen" <malcolm@nag-j.co.jp>
To: "WG5" <sc22wg5@open-std.org>
References: <20141204170247.9A28E35837D@www.open-std.org>
In-Reply-To: <20141204170247.9A28E35837D@www.open-std.org>
Subject: Re: [ukfortran] (SC22WG5.5369) Question on PURE subroutines
Date: Fri, 5 Dec 2014 10:25:07 +0900
Organization: =?utf-8?B?5pel5pysTkFH?=
MIME-Version: 1.0
Content-Type: text/plain;
	format=flowed;
	charset="utf-8";
	reply-type=original
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
Importance: Normal
X-Mailer: Microsoft Windows Live Mail 15.4.3555.308
X-MimeOLE: Produced By Microsoft MimeOLE V15.4.3555.308
Sender: owner-sc22wg5@open-std.org
Precedence: bulk

[of a pure subroutine]
>Yet it appears to implement a side effect in a PURE procedure. Was this 
>intended?

I should point out that if a pure subroutine cannot have a side effect, it can 
be replaced by a NOP (since it has no return value).

Bill writes:
<<<
The issue that Reinhold points out is the case of a pointer appearing in a 
variable definition context when its target is not a local variable, but one 
that is declared in the specification part of a module.  We prohibit direct 
definition of such a variable in a pure procedure
>>>

No we do not.  We do NOT prohibit direct definition of a variable that is "not a 
local variable" in a pure subroutine, precisely when it is not INTENT(IN). 
Which happens to be this case.

Cheers,
-- 
................................Malcolm Cohen, Nihon NAG, Tokyo. 

