From owner-sc22wg5+sc22wg5-dom8=www.open-std.org@open-std.org  Thu Jan 29 15:17:33 2015
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 188663587F1; Thu, 29 Jan 2015 15:17:33 +0100 (CET)
Delivered-To: sc22wg5@open-std.org
Received: from ppsw-40.csi.cam.ac.uk (ppsw-40.csi.cam.ac.uk [131.111.8.140])
	by www.open-std.org (Postfix) with ESMTP id 1A21F3570D2
	for <sc22wg5@open-std.org>; Thu, 29 Jan 2015 15:17:28 +0100 (CET)
X-Cam-AntiVirus: no malware found
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from hermes-1.csi.cam.ac.uk ([131.111.8.51]:42800)
	by ppsw-40.csi.cam.ac.uk (smtp.hermes.cam.ac.uk [131.111.8.156]:25)
	with esmtpa (EXTERNAL:nmm1) id 1YGpuP-00073Q-jT (Exim 4.82_3-c0e5623)
	(return-path <nmm1@hermes.cam.ac.uk>); Thu, 29 Jan 2015 14:17:25 +0000
Received: from prayer by hermes-1.csi.cam.ac.uk (hermes.cam.ac.uk)
	with local (PRAYER:nmm1) id 1YGpuP-0006ZO-19 (Exim 4.72)
	(return-path <nmm1@hermes.cam.ac.uk>); Thu, 29 Jan 2015 14:17:25 +0000
Received: from [146.90.224.195] by old-webmail.hermes.cam.ac.uk
	with HTTP (Prayer-1.3.5); 29 Jan 2015 14:17:25 +0000
Date: 29 Jan 2015 14:17:25 +0000
From: "N.M. Maclaren" <nmm1@cam.ac.uk>
To: Rafik Zurob <rzurob@ca.ibm.com>
Cc: fortran standards email list for J3 <j3@mailman.j3-fortran.org>,
    WG5 Mailing List <sc22wg5@open-std.org>
Subject: Re: [ukfortran] (SC22WG5.5439) (j3.2006) RE: Proposal of a new	requirement
 : CMDMSG	optional argument in 3 subroutines
Message-ID: <Prayer.1.3.5.1501291417250.17688@hermes-1.csi.cam.ac.uk>
In-Reply-To: <20150129031639.25E7F3587C8@www.open-std.org>
References: <20150127125841.B08CB3570D2@www.open-std.org>
 <20150127174136.94FA435733E@www.open-std.org>
 <20150129031639.25E7F3587C8@www.open-std.org>
X-Mailer: Prayer v1.3.5
Mime-Version: 1.0
Content-Type: text/plain; format=flowed; charset=ISO-8859-1
Sender: owner-sc22wg5@open-std.org
Precedence: bulk

On Jan 29 2015, Rafik Zurob wrote:
>
>I also checked the POSIX spec page for getenv() 
>to see if it defines any errors -- it does not.  (I'm not saying everyone 
>on UNIX/Linux/BSD calls getenv().  I was just thinking that if getenv() 
>defined errors, some vendors might have defined status > 2 values to 
>correspond to those errors.)  The Windows GetEnvironmentVariable function 
>also does not appear to define errors not covered by status values -1 to 
>1.

POSIX is, as we all know, a crock.  Implementations can check that the
string is valid and unambiguous and diagnose that separately.  Ones
with significant trailing spaces are ambiguous in Fortran terms.  setenv()
forbids ones with '=', but POSIX says that any characters other than
alphanumerics and underscore are system-dependent (see 8.1).

And, of course, Unix-derived systems are not the universe.

Allowing an implementation to do better than POSIX seems a good idea.
Requiring it to do so would be a mistake.

Regards,
Nick Maclaren.




